mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
pm: fixes for global installs in docker (#14896)
This commit is contained in:
@@ -57,6 +57,8 @@ ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
|
|||||||
|
|
||||||
COPY --from=build /usr/local/bin/bun /usr/local/bin/
|
COPY --from=build /usr/local/bin/bun /usr/local/bin/
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
RUN mkdir -p /usr/local/bun-node-fallback-bin && ln -s /usr/local/bin/bun /usr/local/bun-node-fallback-bin/node
|
||||||
|
ENV PATH "${PATH}:/usr/local/bun-node-fallback-bin"
|
||||||
|
|
||||||
# Temporarily use the `build`-stage /tmp folder to access the glibc APKs:
|
# Temporarily use the `build`-stage /tmp folder to access the glibc APKs:
|
||||||
RUN --mount=type=bind,from=build,source=/tmp,target=/tmp \
|
RUN --mount=type=bind,from=build,source=/tmp,target=/tmp \
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
|
|||||||
|
|
||||||
COPY docker-entrypoint.sh /usr/local/bin
|
COPY docker-entrypoint.sh /usr/local/bin
|
||||||
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
|
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
|
||||||
|
RUN mkdir -p /usr/local/bun-node-fallback-bin && ln -s /usr/local/bin/bun /usr/local/bun-node-fallback-bin/node
|
||||||
|
ENV PATH "${PATH}:/usr/local/bun-node-fallback-bin"
|
||||||
|
|
||||||
RUN groupadd bun \
|
RUN groupadd bun \
|
||||||
--gid 1000 \
|
--gid 1000 \
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ FROM debian:bullseye
|
|||||||
|
|
||||||
COPY docker-entrypoint.sh /usr/local/bin
|
COPY docker-entrypoint.sh /usr/local/bin
|
||||||
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
|
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
|
||||||
|
RUN mkdir -p /usr/local/bun-node-fallback-bin && ln -s /usr/local/bin/bun /usr/local/bun-node-fallback-bin/node
|
||||||
|
ENV PATH "${PATH}:/usr/local/bun-node-fallback-bin"
|
||||||
|
|
||||||
# Disable the runtime transpiler cache by default inside Docker containers.
|
# Disable the runtime transpiler cache by default inside Docker containers.
|
||||||
# On ephemeral containers, the cache is not useful
|
# On ephemeral containers, the cache is not useful
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ ARG BUN_INSTALL_BIN=/usr/local/bin
|
|||||||
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
|
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
|
||||||
|
|
||||||
COPY --from=build /usr/local/bin/bun /usr/local/bin/
|
COPY --from=build /usr/local/bin/bun /usr/local/bin/
|
||||||
|
RUN mkdir -p /usr/local/bun-node-fallback-bin && ln -s /usr/local/bin/bun /usr/local/bun-node-fallback-bin/node
|
||||||
|
ENV PATH "${PATH}:/usr/local/bun-node-fallback-bin"
|
||||||
|
|
||||||
# Temporarily use the `build`-stage image binaries to create a symlink:
|
# Temporarily use the `build`-stage image binaries to create a symlink:
|
||||||
RUN --mount=type=bind,from=build,source=/usr/bin,target=/usr/bin \
|
RUN --mount=type=bind,from=build,source=/usr/bin,target=/usr/bin \
|
||||||
|
|||||||
Reference in New Issue
Block a user