From d060474f3a05a50f8424348e7e381a0af8324c8b Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:06:44 +1300 Subject: [PATCH] fix: Docker - Include `bunx` symlink in distroless variant (#6090) --- dockerhub/distroless/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dockerhub/distroless/Dockerfile b/dockerhub/distroless/Dockerfile index 9bba1dddab..9682ff9b18 100644 --- a/dockerhub/distroless/Dockerfile +++ b/dockerhub/distroless/Dockerfile @@ -52,16 +52,16 @@ RUN apt-get update -qq \ && mv "bun-linux-$build/bun" /usr/local/bin/bun \ && rm -f "bun-linux-$build.zip" SHASUMS256.txt.asc SHASUMS256.txt \ && chmod +x /usr/local/bin/bun \ + && ln -s /usr/local/bin/bun /usr/local/bin/bunx \ && which bun \ + && which bunx \ && bun --version FROM gcr.io/distroless/base-nossl-debian11 -COPY --from=build /usr/local/bin/bun /usr/local/bin/ - -# Known issue: `bunx` is not available in distroless. -# -# If `ln` is used in the build image, the size of the final -# image will be double, because of: https://github.com/oven-sh/bun/issues/5269 +# List of sources to destination (final path): +COPY --from=build \ + /usr/local/bin/bun /usr/local/bin/bunx \ + /usr/local/bin ENTRYPOINT ["/usr/local/bin/bun"]