update watchtower

closes #416

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-09-14 15:34:31 -04:00
parent ef3ead938e
commit 095a52053e
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -1,35 +1,29 @@
FROM alpine:latest
FROM golang:alpine as builder
LABEL maintainer "Jess Frazelle <jess@linux.com>"
RUN apk --no-cache add \
ca-certificates \
gcc \
git \
libc-dev
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
RUN apk --no-cache add \
ca-certificates
ENV WATCHTOWER_VERSION v0.3.0
RUN buildDeps=' \
bash \
go \
git \
gcc \
g++ \
libc-dev \
libgcc \
make \
' \
set -x \
&& apk --no-cache add $buildDeps \
&& git clone --depth 1 --branch ${WATCHTOWER_VERSION} https://github.com/v2tec/watchtower /go/src/github.com/v2tec/watchtower \
&& go get github.com/Masterminds/glide \
&& cd /go/src/github.com/v2tec/watchtower \
&& glide install \
&& go build -o /usr/bin/watchtower \
&& apk del $buildDeps \
&& rm -rf /go \
&& echo "Build complete."
RUN git clone --depth 1 --branch ${WATCHTOWER_VERSION} https://github.com/v2tec/watchtower /go/src/github.com/v2tec/watchtower
RUN go get github.com/Masterminds/glide
WORKDIR /go/src/github.com/v2tec/watchtower
RUN glide install
RUN go build -o /usr/bin/watchtower
FROM alpine:latest
COPY --from=builder /usr/bin/watchtower /usr/bin/watchtower
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
ENTRYPOINT [ "watchtower" ]
CMD [ "--help" ]