2020-10-26 10:50:58 +00:00
|
|
|
FROM golang:1.15.3-alpine3.12 as builder
|
2019-07-09 11:13:44 +00:00
|
|
|
RUN apk add --update --no-cache ca-certificates git tzdata
|
2019-06-01 17:31:30 +00:00
|
|
|
WORKDIR /tmp/dnsupdater
|
2019-07-09 11:13:44 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY ./ ./
|
2020-10-26 10:50:58 +00:00
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o dnsupdater ./cmd/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
|
2019-06-12 06:53:29 +00:00
|
|
|
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
|
2019-12-17 17:40:50 +00:00
|
|
|
RUN chmod +x entry.sh
|
2019-07-09 11:13:44 +00:00
|
|
|
COPY --from=builder /tmp/dnsupdater/dnsupdater .
|
2019-06-12 06:53:29 +00:00
|
|
|
ENTRYPOINT ["/entry.sh"]
|