Remove lograge configuration from Docker image and production

This commit is contained in:
Christoph Haas 2026-08-22 22:08:05 +02:00
parent 4948fe50e3
commit fdf3289f54
2 changed files with 6 additions and 17 deletions

View file

@ -8,7 +8,7 @@ ARG BUN_VERSION=1.3.9
# --- Stage 1: Grab Node.js Binaries ---
# We use the official image as a source for pre-compiled binaries
FROM docker.io/library/node:${NODE_VERSION}-slim AS node_source
FROM docker.io/library/node:${NODE_VERSION} AS node_source
# --- Stage 2: Base (Runtime Environment) ---
FROM docker.io/library/ruby:${RUBY_VERSION}-slim AS base
@ -36,15 +36,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update -qq && \
apt-get install --no-install-recommends -y \
build-essential git libyaml-dev node-gyp pkg-config python-is-python3
build-essential git libyaml-dev pkg-config python-is-python3
# "Heist" Node.js and npm from the node_source stage (build-time only)
COPY --from=node_source /usr/local/bin/node /usr/local/bin/node
COPY --from=node_source /usr/local/lib/node_modules /usr/local/lib/node_modules
# Install Node.js and npm from node_source
COPY --from=node_source /usr/local/ /usr/local/
# Re-link npm and install Bun (build-time only)
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
npm install -g bun@${BUN_VERSION}
# Install Bun
RUN npm install -g bun@${BUN_VERSION}
# 1. Install Gems (Separate COPY for maximum caching)
COPY Gemfile Gemfile.lock ./