dnsupdater/Dockerfile

18 lines
597 B
Docker
Raw Normal View History

2019-07-09 11:13:44 +00:00
FROM golang:1.12.6-alpine3.10 as builder
RUN apk add --update --no-cache ca-certificates git tzdata
WORKDIR /tmp/dnsupdater
2019-07-09 11:13:44 +00:00
COPY go.mod go.sum ./
RUN go mod download
COPY ./ ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o dnsupdater .
2019-04-05 12:49:57 +00:00
FROM busybox:glibc
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
RUN mkdir -p /var/spool/cron/crontabs /var/log
RUN touch /var/log/cron.log
2019-07-09 11:13:44 +00:00
COPY entry.sh /entry.sh
COPY --from=builder /tmp/dnsupdater/dnsupdater .
ENTRYPOINT ["/entry.sh"]