-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jauder Ho <[email protected]>
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 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,5 +1,4 @@ | ||
FROM golang:1.22.0-alpine3.19@sha256:8e96e6cff6a388c2f70f5f662b64120941fcd7d4b89d62fec87520323a316bd9 AS build | ||
#FROM golang:1.22.0-alpine3.19@sha256:8e96e6cff6a388c2f70f5f662b64120941fcd7d4b89d62fec87520323a316bd9 AS build | ||
|
||
WORKDIR /go/src/github.com/coredns/coredns/ | ||
|
||
|
@@ -17,18 +16,21 @@ RUN test -n "${BUILD_VERSION}" \ | |
&& update-ca-certificates \ | ||
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/coredns.tar.gz \ | ||
&& tar xzf /tmp/coredns.tar.gz --strip 1 -C /go/src/github.com/coredns/coredns \ | ||
&& go get -u golang.org/x/net \ | ||
#&& go get -u golang.org/x/net \ | ||
&& go mod tidy \ | ||
&& make | ||
&& make \ | ||
&& cp coredns /go/bin/coredns \ | ||
&& go clean && go clean -cache && go clean -modcache | ||
|
||
# Validation check | ||
RUN cp coredns /go/bin/coredns | ||
RUN coredns -version | ||
RUN /go/bin/coredns -version | ||
|
||
|
||
|
||
# ---------------------------------------------------------------------------- | ||
|
||
|
||
|
||
FROM scratch | ||
|
||
LABEL org.opencontainers.image.authors="Jauder Ho <[email protected]>" | ||
|
@@ -39,7 +41,7 @@ LABEL org.opencontainers.image.title="jauderho/coredns" | |
LABEL org.opencontainers.image.description="CoreDNS is a DNS server" | ||
|
||
COPY --from=build /etc/ssl/certs /etc/ssl/certs | ||
COPY --from=build /go/src/github.com/coredns/coredns/coredns /usr/local/bin/ | ||
COPY --from=build /go/bin/coredns /usr/local/bin/ | ||
|
||
#EXPOSE 53/tcp 53/udp | ||
|
||
|