fix(docker): use npm install instead of npm ci for self-contained builds

npm ci requires a package-lock.json and installs exactly what it specifies.
npm install resolves from package.json directly, making the Docker build
fully self-contained — you can clone the repo and run docker build with no
local Node tooling or pre-existing lockfile.
This commit is contained in:
2026-05-24 20:23:57 -04:00
parent 87da5c3cf5
commit 6e8986bea5
+3 -3
View File
@@ -8,15 +8,15 @@ RUN apk add --no-cache nodejs npm curl git
# Install Go tools (cached well)
RUN wget -O /tmp/sqlc.tar.gz https://github.com/sqlc-dev/sqlc/releases/download/v1.31.0/sqlc_1.31.0_linux_amd64.tar.gz && \
tar -xzf /tmp/sqlc.tar.gz -C /usr/local/bin sqlc && \
rm /tmp/sqlc.tar.gz
tar -xzf /tmp/sqlc.tar.gz -C /usr/local/bin sqlc && \
rm /tmp/sqlc.tar.gz
RUN --mount=type=cache,target=/root/go/pkg/mod \
go install github.com/a-h/templ/cmd/templ@v0.3.1020
# Copy package files and install npm dependencies (cached unless package.json changes)
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci
npm install
# Copy Go mod files (cached unless go.mod changes)
COPY go.mod go.sum ./