From 516efbba32d2ae4a43fba24fed04a840278a6f4b Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 11 Oct 2016 12:18:46 +0200 Subject: [PATCH] update buil process for confd 0.12 --- Dockerfile | 29 +++++++++++++---------- {root => rootfs}/etc/cont-init.d/01-confd | 0 2 files changed, 17 insertions(+), 12 deletions(-) rename {root => rootfs}/etc/cont-init.d/01-confd (100%) diff --git a/Dockerfile b/Dockerfile index f41b59a..a2613e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,22 @@ FROM smebberson/alpine-base:latest -ENV CONFD_VERSION=v0.12.0-alpha3 +ENV VERSION=v0.12.0-alpha3 -RUN apk add --no-cache go git gcc musl-dev && \ - git clone https://github.com/kelseyhightower/confd.git /src/confd && \ - cd /src/confd && \ - git checkout -q --detach "$CONFD_VERSION" && \ - cd /src/confd/src/github.com/kelseyhightower/confd && \ - GOPATH=/src/confd/vendor:/src/confd go build -a -installsuffix cgo -ldflags '-extld ld -extldflags -static' -x . && \ - mv ./confd /bin/ && \ - chmod +x /bin/confd && \ - apk del go git gcc musl-dev && \ -rm -rf /src +RUN apk add --no-cache go gcc musl-dev openssl tar git -ADD /root / +RUN mkdir -p /src/confd +RUN wget -qO- https://github.com/kelseyhightower/confd/archive/$VERSION.tar.gz | tar -xz -C /src/confd --strip 1 +WORKDIR /src/confd +ENV GOPATH /src/confd/vendor:/src/confd +RUN go get -d +RUN go build -a -installsuffix cgo -ldflags '-extld ld -extldflags -static' -x . +RUN mv ./confd /bin/ +RUN chmod +x /bin/confd + +RUN apk del go gcc musl-dev openssl tar git +RUN rm -rf /src + +WORKDIR / + +ADD /rootfs / diff --git a/root/etc/cont-init.d/01-confd b/rootfs/etc/cont-init.d/01-confd similarity index 100% rename from root/etc/cont-init.d/01-confd rename to rootfs/etc/cont-init.d/01-confd