File tree Expand file tree Collapse file tree 2 files changed +446
-5
lines changed
Expand file tree Collapse file tree 2 files changed +446
-5
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,23 @@ WORKDIR /go/src/github.com/Azure/acr-cli
1010COPY . .
1111RUN make binaries && mv bin/acr /usr/bin/acr
1212
13- FROM mcr.microsoft.com/azurelinux/base/core:3.0
14- RUN tdnf check-update \
15- && tdnf --refresh install -y \
16- ca-certificates-microsoft \
17- && tdnf clean all
13+ # Manually copy essential libraries that Go FIPS binaries typically need
14+ RUN mkdir -p /tmp/libs && \
15+ cp /lib64/libc.so.6 /tmp/libs/ 2>/dev/null || true && \
16+ cp /lib64/libdl.so.2 /tmp/libs/ 2>/dev/null || true && \
17+ cp /lib64/libpthread.so.0 /tmp/libs/ 2>/dev/null || true && \
18+ cp /lib64/librt.so.1 /tmp/libs/ 2>/dev/null || true && \
19+ cp /lib64/libresolv.so.2 /tmp/libs/ 2>/dev/null || true && \
20+ cp /lib64/libssl.so* /tmp/libs/ 2>/dev/null || true && \
21+ cp /lib64/libcrypto.so* /tmp/libs/ 2>/dev/null || true && \
22+ cp /usr/lib64/libssl.so* /tmp/libs/ 2>/dev/null || true && \
23+ cp /usr/lib64/libcrypto.so* /tmp/libs/ 2>/dev/null || true
24+
25+ FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0
26+ # Copy the dynamic linker
27+ COPY --from=acr-cli /lib/ld-linux-aarch64.so.1 /lib/
28+ # Copy essential libraries
29+ COPY --from=acr-cli /tmp/libs/ /lib64/
30+ # Copy the binary
1831COPY --from=acr-cli /usr/bin/acr /usr/bin/acr
1932ENTRYPOINT [ "/usr/bin/acr" ]
You can’t perform that action at this time.
0 commit comments