Skip to content

Commit b7a16fa

Browse files
gyutaebjoestringer
authored andcommitted
fix(Dockerfile): set correct platform args for the debug-tools
This dockerfile copies binaries produces in the builder stage to the target system. Selecting the proper debug-tools image's platform prevents cross-platform compile errors. Signed-off-by: Gyutae Bae <gyutae.bae@navercorp.com>
1 parent 4263c9b commit b7a16fa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

images/cilium/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ CMD ["/usr/bin/cilium-dbg"]
118118
# image, install delve debugger and wrap the cilium-agent binary calls
119119
# with a script that automatically provisions the debugger on a
120120
# dedicated port.
121+
FROM ${CILIUM_BUILDER_IMAGE} AS debug-tools
121122
FROM release AS debug
122123
# TARGETOS is an automatic platform ARG enabled by Docker BuildKit.
123124
ARG TARGETOS
@@ -126,8 +127,8 @@ ARG TARGETARCH
126127
ARG DEBUG_HOLD
127128
ENV DEBUG_HOLD=${DEBUG_HOLD}
128129
COPY --from=builder /tmp/install/${TARGETOS}/${TARGETARCH}/usr/bin/cilium-agent /usr/bin/cilium-agent-bin
129-
COPY --from=builder /go/bin/dlv /usr/bin/dlv
130-
COPY --from=builder /out/${TARGETOS}/${TARGETARCH}/bin/debug-wrapper /usr/bin/cilium-agent
130+
COPY --from=debug-tools /go/bin/dlv /usr/bin/dlv
131+
COPY --from=debug-tools /out/${TARGETOS}/${TARGETARCH}/bin/debug-wrapper /usr/bin/cilium-agent
131132

132133
# Copy the debug symbols across in case the binaries were stripped
133134
COPY --from=builder /tmp/debug/${TARGETOS}/${TARGETARCH}/ /usr/lib/debug/

0 commit comments

Comments
 (0)