From 1cb8931309441ad34adb8590e6e8e7662d04914a Mon Sep 17 00:00:00 2001 From: Florian Bertholin Date: Sat, 18 Mar 2017 19:12:58 +0100 Subject: [PATCH] Dockerfile now derives from golang:1.8.0-alpine --- Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb4745e..69c6d0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,4 @@ -# Docker image for the Drone Terraform plugin -# -# docker build --rm=true -t jmccann/drone-terraform:latest . - -FROM alpine:3.5 +FROM golang:1.8.0-alpine ENV TERRAFORM_VERSION 0.8.8 @@ -13,9 +9,13 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" | tee -a /etc/apk wget && \ rm -rf /var/cache/apk/* && \ wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -O terraform.zip && \ - unzip terraform.zip && \ - rm terraform.zip && \ - mv terraform /bin + unzip terraform.zip -d /bin && \ + rm -rf /var/cache/apk/* terraform.zip + +ADD . /go/src/github.com/jmccann/drone-terraform + +WORKDIR /go/src/github.com/jmccann/drone-terraform + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -a -tags netgo -ADD drone-terraform /bin/ -ENTRYPOINT ["/bin/drone-terraform"] +ENTRYPOINT ["/go/bin/drone-terraform"]