We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4040f3 commit 782a639Copy full SHA for 782a639
1 file changed
go/Dockerfile
@@ -1,7 +1,8 @@
1
FROM golang:1.14.1 as delve
2
RUN curl --location --output delve-1.4.0.tar.gz https://github.com/go-delve/delve/archive/v1.4.0.tar.gz \
3
- && tar xzf delve-1.4.0.tar.gz
4
-RUN cd delve-1.4.0/cmd/dlv && go install
+ && tar xzf delve-1.4.0.tar.gz
+# Produce an as-static-as-possible dlv binary to work on musl and glibc
5
+RUN cd delve-1.4.0 && CGO_ENABLED=0 go build -o /go/dlv -ldflags '-extldflags "-static"' ./cmd/dlv/
6
7
# Now populate the duct-tape image with the language runtime debugging support files
8
# The debian image is about 95MB bigger
@@ -10,4 +11,4 @@ FROM busybox
10
11
COPY install.sh /
12
CMD ["/bin/sh", "/install.sh"]
13
WORKDIR /duct-tape
-COPY --from=delve /go/bin/dlv go/bin/
14
+COPY --from=delve /go/dlv go/bin/
0 commit comments