Merge pull request #1750 from tonistiigi/add-debug
Dockerfile: don’t remove debug info on buildkitd/runc binariesv0.8
commit
a41fb8c48b
|
@ -65,7 +65,7 @@ FROM gobuild-base AS runc
|
|||
WORKDIR $GOPATH/src/github.com/opencontainers/runc
|
||||
ARG TARGETPLATFORM
|
||||
RUN --mount=from=runc-src,src=/usr/src/runc,target=. --mount=target=/root/.cache,type=cache \
|
||||
CGO_ENABLED=1 go build -ldflags '-w -extldflags -static' -tags 'seccomp netgo cgo static_build osusergo' -o /usr/bin/runc ./ && \
|
||||
CGO_ENABLED=1 go build -ldflags '-extldflags -static' -tags 'seccomp netgo cgo static_build osusergo' -o /usr/bin/runc ./ && \
|
||||
file /usr/bin/runc | grep "statically linked"
|
||||
|
||||
FROM gobuild-base AS buildkit-base
|
||||
|
@ -97,7 +97,7 @@ ARG BUILDKITD_TAGS
|
|||
RUN --mount=target=. --mount=target=/root/.cache,type=cache \
|
||||
--mount=target=/go/pkg/mod,type=cache \
|
||||
--mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=buildkit-version \
|
||||
go build -ldflags "$(cat /tmp/.ldflags) -w -extldflags -static" -tags "osusergo netgo static_build seccomp ${BUILDKITD_TAGS}" -o /usr/bin/buildkitd ./cmd/buildkitd && \
|
||||
go build -ldflags "$(cat /tmp/.ldflags) -extldflags '-static'" -tags "osusergo netgo static_build seccomp ${BUILDKITD_TAGS}" -o /usr/bin/buildkitd ./cmd/buildkitd && \
|
||||
file /usr/bin/buildkitd | egrep "statically linked|Windows"
|
||||
|
||||
FROM scratch AS binaries-linux-helper
|
||||
|
|
Loading…
Reference in New Issue