aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Brennan Kinney <5098581+polarathene@users.noreply.github.com> 2023-09-27 13:06:44 +1300
committerGravatar GitHub <noreply@github.com> 2023-09-26 17:06:44 -0700
commitd060474f3a05a50f8424348e7e381a0af8324c8b (patch)
treedec77f4b23251a806e4e0730e59d79906d04622a
parentfae646da3b07b77cad9bc7459cb26acedbd9e67c (diff)
downloadbun-d060474f3a05a50f8424348e7e381a0af8324c8b.tar.gz
bun-d060474f3a05a50f8424348e7e381a0af8324c8b.tar.zst
bun-d060474f3a05a50f8424348e7e381a0af8324c8b.zip
fix: Docker - Include `bunx` symlink in distroless variant (#6090)
-rw-r--r--dockerhub/distroless/Dockerfile12
1 files changed, 6 insertions, 6 deletions
diff --git a/dockerhub/distroless/Dockerfile b/dockerhub/distroless/Dockerfile
index 9bba1ddda..9682ff9b1 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"]