Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| be658e9d77 | |||
| 13241612fe |
@@ -2,7 +2,7 @@
|
|||||||
# the registry.npmjs.org hosts found in package-lock.json to this mirror at
|
# the registry.npmjs.org hosts found in package-lock.json to this mirror at
|
||||||
# install time (default replace-registry-host=npmjs), so the committed lockfile
|
# install time (default replace-registry-host=npmjs), so the committed lockfile
|
||||||
# is reused as-is — no regeneration needed.
|
# is reused as-is — no regeneration needed.
|
||||||
registry=https://mirror.soroushasadi.com/repository/npm-group/
|
registry=http://mirror.soroushasadi.com/repository/npm-group/
|
||||||
|
|
||||||
# Auth is never committed. CI and the Docker build append an `_authToken` line
|
# Auth is never committed. CI and the Docker build append an `_authToken` line
|
||||||
# from the NPM_TOKEN secret at install time; for local installs put the token in
|
# from the NPM_TOKEN secret at install time; for local installs put the token in
|
||||||
|
|||||||
+4
-4
@@ -4,7 +4,7 @@
|
|||||||
# as mirror.soroushasadi.com/repository/docker-group/<image>.
|
# as mirror.soroushasadi.com/repository/docker-group/<image>.
|
||||||
# Build directly against Docker Hub instead with:
|
# Build directly against Docker Hub instead with:
|
||||||
# --build-arg NODE_IMAGE=node:20-slim
|
# --build-arg NODE_IMAGE=node:20-slim
|
||||||
ARG NODE_IMAGE=node:20-slim
|
ARG NODE_IMAGE=mirror.soroushasadi.com/repository/docker-group/node:20-slim
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# 1. Dependencies — installs node_modules and compiles the better-sqlite3
|
# 1. Dependencies — installs node_modules and compiles the better-sqlite3
|
||||||
# native addon (needs python3 + a C++ toolchain).
|
# native addon (needs python3 + a C++ toolchain).
|
||||||
@@ -15,9 +15,9 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends python3 make g++ ca-certificates \
|
&& apt-get install -y --no-install-recommends python3 make g++ ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
# .npmrc points npm at the Nexus npm-group; NPM_TOKEN (optional) authenticates.
|
# .npmrc points npm at the Nexus npm-group; NPM_TOKEN (optional) authenticates.
|
||||||
# The token is written only into this build stage and never reaches the runner
|
# The token is appended at build time only — never reaches the runner image.
|
||||||
# image, which copies node_modules — not .npmrc.
|
ARG NPM_TOKEN=""
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json .npmrc ./
|
||||||
RUN if [ -n "$NPM_TOKEN" ]; then \
|
RUN if [ -n "$NPM_TOKEN" ]; then \
|
||||||
echo "//mirror.soroushasadi.com/repository/npm-group/:_authToken=${NPM_TOKEN}" >> .npmrc ; \
|
echo "//mirror.soroushasadi.com/repository/npm-group/:_authToken=${NPM_TOKEN}" >> .npmrc ; \
|
||||||
fi \
|
fi \
|
||||||
|
|||||||
Reference in New Issue
Block a user