2019-06-01 17:31:30 +00:00
|
|
|
FROM golang as builder
|
|
|
|
WORKDIR /tmp/dnsupdater
|
|
|
|
COPY . .
|
|
|
|
RUN go get .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o dnsupdater .
|
2019-04-05 12:49:57 +00:00
|
|
|
|
2019-06-12 06:53:29 +00:00
|
|
|
FROM busybox:glibc
|
2019-06-01 17:31:30 +00:00
|
|
|
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 /tmp/dnsupdater/dnsupdater .
|
2019-06-12 06:53:29 +00:00
|
|
|
|
|
|
|
RUN mkdir -p /var/spool/cron/crontabs /var/log
|
|
|
|
COPY entry.sh /entry.sh
|
|
|
|
RUN touch /var/log/cron.log
|
|
|
|
WORKDIR "/"
|
|
|
|
ENTRYPOINT ["/entry.sh"]
|