mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Moved dockerfiles to an exclusive folder
This commit is contained in:
parent
545c76f011
commit
503d693377
3 changed files with 0 additions and 0 deletions
18
dockerfiles/Dockerfile
Normal file
18
dockerfiles/Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
FROM alpine:3.9 as alpine
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
tzdata
|
||||
|
||||
FROM scratch
|
||||
LABEL "com.centurylinklabs.watchtower"="true"
|
||||
|
||||
COPY --from=alpine \
|
||||
/etc/ssl/certs/ca-certificates.crt \
|
||||
/etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=alpine \
|
||||
/usr/share/zoneinfo \
|
||||
/usr/share/zoneinfo
|
||||
|
||||
COPY watchtower /
|
||||
ENTRYPOINT ["/watchtower"]
|
38
dockerfiles/Dockerfile.dev-self-contained
Normal file
38
dockerfiles/Dockerfile.dev-self-contained
Normal file
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Builder
|
||||
#
|
||||
|
||||
FROM golang:alpine as builder
|
||||
|
||||
# use version (for example "v0.3.3") or "master"
|
||||
ARG WATCHTOWER_VERSION=master
|
||||
|
||||
RUN apk add --no-cache \
|
||||
alpine-sdk \
|
||||
ca-certificates \
|
||||
git \
|
||||
tzdata
|
||||
|
||||
COPY . /watchtower
|
||||
|
||||
RUN \
|
||||
cd /watchtower && \
|
||||
\
|
||||
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . && \
|
||||
GO111MODULE=on go test ./... -v
|
||||
|
||||
|
||||
#
|
||||
# watchtower
|
||||
#
|
||||
|
||||
FROM scratch
|
||||
|
||||
LABEL "com.centurylinklabs.watchtower"="true"
|
||||
|
||||
# copy files from other container
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
||||
COPY --from=builder /watchtower/watchtower /watchtower
|
||||
|
||||
ENTRYPOINT ["/watchtower"]
|
38
dockerfiles/Dockerfile.self-contained
Normal file
38
dockerfiles/Dockerfile.self-contained
Normal file
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Builder
|
||||
#
|
||||
|
||||
FROM golang:alpine as builder
|
||||
|
||||
# use version (for example "v0.3.3") or "master"
|
||||
ARG WATCHTOWER_VERSION=master
|
||||
|
||||
RUN apk add --no-cache \
|
||||
alpine-sdk \
|
||||
ca-certificates \
|
||||
git \
|
||||
tzdata
|
||||
|
||||
RUN git clone --branch "${WATCHTOWER_VERSION}" https://github.com/containrrr/watchtower.git
|
||||
|
||||
RUN \
|
||||
cd watchtower && \
|
||||
\
|
||||
GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . && \
|
||||
GO111MODULE=on go test ./... -v
|
||||
|
||||
|
||||
#
|
||||
# watchtower
|
||||
#
|
||||
|
||||
FROM scratch
|
||||
|
||||
LABEL "com.centurylinklabs.watchtower"="true"
|
||||
|
||||
# copy files from other container
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
||||
COPY --from=builder /go/watchtower/watchtower /watchtower
|
||||
|
||||
ENTRYPOINT ["/watchtower"]
|
Loading…
Add table
Add a link
Reference in a new issue