Skip to content

Commit

Permalink
Define BUN_INSTALL_BIN in Dockerfiles
Browse files Browse the repository at this point in the history
Fixes #8753
  • Loading branch information
Electroid committed Apr 4, 2024
1 parent 0dfbdc7 commit 14c23cc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dockerhub/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ FROM alpine:3.18
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}

# Ensure `bun install -g` works
ARG BUN_INSTALL_BIN=/usr/local/bin
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}

COPY --from=build /usr/local/bin/bun /usr/local/bin/
COPY docker-entrypoint.sh /usr/local/bin/

Expand Down
4 changes: 4 additions & 0 deletions dockerhub/debian-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ FROM debian:bullseye-slim
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}

# Ensure `bun install -g` works
ARG BUN_INSTALL_BIN=/usr/local/bin
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}

COPY docker-entrypoint.sh /usr/local/bin
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun

Expand Down
4 changes: 4 additions & 0 deletions dockerhub/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}

# Ensure `bun install -g` works
ARG BUN_INSTALL_BIN=/usr/local/bin
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}

RUN groupadd bun \
--gid 1000 \
&& useradd bun \
Expand Down
4 changes: 4 additions & 0 deletions dockerhub/distroless/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ FROM gcr.io/distroless/base-nossl-debian11
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}

# Ensure `bun install -g` works
ARG BUN_INSTALL_BIN=/usr/local/bin
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}

COPY --from=build /usr/local/bin/bun /usr/local/bin/

# Temporarily use the `build`-stage image binaries to create a symlink:
Expand Down

0 comments on commit 14c23cc

Please sign in to comment.