forked from joohoi/acme-dns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify and merge joohoi#275 to our fork
Co-authored-by: Daniel Pittman <[email protected]> Signed-off-by: İlteriş Yağıztegin Eroğlu <[email protected]>
- Loading branch information
1 parent
1ce3a69
commit 043f732
Showing
1 changed file
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
FROM golang:alpine AS builder | ||
LABEL maintainer="[email protected]" | ||
FROM golang:1-alpine AS builder | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN apk add --update gcc musl-dev git | ||
|
||
ENV GOPATH /tmp/buildcache | ||
RUN git clone https://github.com/joohoi/acme-dns /tmp/acme-dns | ||
RUN git clone --branch maintenance --depth=1 https://github.com/linuxgemini/acme-dns /tmp/acme-dns | ||
|
||
ENV GOPATH /tmp/buildcache | ||
ENV CGO_ENABLED 1 | ||
WORKDIR /tmp/acme-dns | ||
RUN CGO_ENABLED=1 go build | ||
RUN go build -ldflags="-extldflags=-static" | ||
|
||
# assemble the release ready to copy to the image. | ||
RUN mkdir -p /tmp/release/bin | ||
RUN mkdir -p /tmp/release/etc/acme-dns | ||
RUN mkdir -p /tmp/release/var/lib/acme-dns | ||
RUN cp /tmp/acme-dns/acme-dns /tmp/release/bin/acme-dns | ||
|
||
|
||
FROM alpine:latest | ||
FROM gcr.io/distroless/static | ||
|
||
WORKDIR /root/ | ||
COPY --from=builder /tmp/acme-dns . | ||
RUN mkdir -p /etc/acme-dns | ||
RUN mkdir -p /var/lib/acme-dns | ||
RUN rm -rf ./config.cfg | ||
RUN apk --no-cache add ca-certificates && update-ca-certificates | ||
WORKDIR / | ||
COPY --from=builder /tmp/release . | ||
|
||
VOLUME ["/etc/acme-dns", "/var/lib/acme-dns"] | ||
ENTRYPOINT ["./acme-dns"] | ||
ENTRYPOINT ["/bin/acme-dns"] | ||
EXPOSE 53 80 443 | ||
EXPOSE 53/udp |