You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using your image I tried to bump the CoreDNS version to 1.11.1.
CoreDNS requires Go 1.20 to compile, so I bumped that too.
The Go build images don't come with gcc any more, so I added build-base.
diff --git a/Dockerfile b/Dockerfile
index 559a327..1b729ee 100644
--- a/Dockerfile+++ b/Dockerfile@@ -1,16 +1,18 @@-ARG GOLANG_VERS=1.18+ARG GOLANG_VERS=1.20
ARG ALPINE_VERS=3.17
FROM golang:${GOLANG_VERS}-alpine${ALPINE_VERS}
ARG CGO_ENABLED=1
ARG PLUGIN_PRIO=50
-ARG COREDNS_VERS=1.10.1+ARG COREDNS_VERS=1.11.1
RUN go mod download github.com/coredns/coredns@v${COREDNS_VERS}
WORKDIR $GOPATH/pkg/mod/github.com/coredns/coredns@v${COREDNS_VERS}
RUN go mod download
+RUN apk add --no-cache build-base+
COPY --link ./ $GOPATH/pkg/mod/github.com/kevinjqiu/coredns-dockerdiscovery
RUN sed -i "s/^#.*//g; /^$/d; $PLUGIN_PRIO i docker:dockerdiscovery" plugin.cfg \
&& go mod edit -replace\
Following that I get this error when building:
=> ERROR [stage-0 7/7] RUN sed -i "s/^#.*//g; /^$/d; 50 i docker:dockerdiscovery" plugin.cfg && go mod edit 18.8s
------
> [stage-0 7/7] RUN sed -i "s/^#.*//g; /^$/d; 50 i docker:dockerdiscovery" plugin.cfg && go mod edit -replace dockerdiscovery=/go/pkg/mod/github.com/kevinjqiu/coredns-dockerdiscovery && go generate coredns.go && go build -mod=mod -o=/usr/local/bin/coredns && apk --no-cache add binutils && strip -vs /usr/local/bin/coredns:
18.45 # github.com/coredns/coredns/core/plugin
18.45 core/plugin/zplugin.go:7:4: could not import dockerdiscovery (open : no such file or directory)
------
Dockerfile:17
--------------------
16 | COPY --link ./ $GOPATH/pkg/mod/github.com/kevinjqiu/coredns-dockerdiscovery
17 | >>> RUN sed -i "s/^#.*//g; /^$/d; $PLUGIN_PRIO i docker:dockerdiscovery" plugin.cfg \
18 | >>> && go mod edit -replace\
19 | >>> dockerdiscovery=$GOPATH/pkg/mod/github.com/kevinjqiu/coredns-dockerdiscovery\
20 | >>> && go generate coredns.go && go build -mod=mod -o=/usr/local/bin/coredns && \
21 | >>> apk --no-cache add binutils && strip -vs /usr/local/bin/coredns
22 |
--------------------
ERROR: failed to solve: process "/bin/sh -c sed -i \"s/^#.*//g; /^$/d; $PLUGIN_PRIO i docker:dockerdiscovery\" plugin.cfg && go mod edit -replace dockerdiscovery=$GOPATH/pkg/mod/github.com/kevinjqiu/coredns-dockerdiscovery && go generate coredns.go && go build -mod=mod -o=/usr/local/bin/coredns && apk --no-cache add binutils && strip -vs /usr/local/bin/coredns" did not complete successfully: exit code: 1
The text was updated successfully, but these errors were encountered:
p3lim
changed the title
Does not work with CoreDNS 1.11.1
Does not build with CoreDNS 1.11.1
Feb 5, 2024
Using your image I tried to bump the CoreDNS version to 1.11.1.
CoreDNS requires Go 1.20 to compile, so I bumped that too.
The Go build images don't come with gcc any more, so I added
build-base
.Following that I get this error when building:
The text was updated successfully, but these errors were encountered: