From 902de27f7a46ad0bd4d7bceb0187d7a319691526 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 5 Jul 2016 20:23:41 +0200 Subject: [PATCH] Install terraform from new package To avoid the download of untrusted packages I have updated the Dockerfile to use a package provided by alpine testing repository. --- Dockerfile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed99208..e1ae62a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,16 @@ -# Docker image for Drone's terraform deployment plugin +# Docker image for the Drone Terraform plugin # -# CGO_ENABLED=0 go build -a -tags netgo -# docker build --rm=true -t plugins/drone-terraform . +# cd $GOPATH/src/github.com/drone-plugins/drone-terraform +# make deps build docker -FROM gliderlabs/alpine:3.2 -RUN apk-install ca-certificates git +FROM alpine:3.4 -ENV TERRAFORM_VERSION 0.6.16 - -RUN apk update && \ - wget -q "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.21-r2/glibc-2.21-r2.apk" && \ - apk add --allow-untrusted glibc-2.21-r2.apk && \ - wget -q -O terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \ - unzip terraform.zip -d /bin && \ - rm -rf /var/cache/apk/* glibc-2.21-r2.apk terraform.zip +RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories && \ + apk -U add \ + ca-certificates \ + git \ + terraform@testing && \ + rm -rf /var/cache/apk/* ADD drone-terraform /bin/ ENTRYPOINT ["/bin/drone-terraform"]