Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dummy Backend
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Examples
Javascript
Dummy Backend
Commits
7e8cb2e4
Commit
7e8cb2e4
authored
4 months ago
by
Dmitriy Safronov
Browse files
Options
Downloads
Patches
Plain Diff
refactor: versions for Dependabot
Signed-off-by:
Dmitriy Safronov
<
zimniy@cyberbrain.pw
>
parent
ed2d2118
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+3
-7
3 additions, 7 deletions
Dockerfile
with
3 additions
and
7 deletions
Dockerfile
+
3
−
7
View file @
7e8cb2e4
# VERSIONS
ARG
NODE_VERSION=20.13.1
ARG
NPM_VERSION=10.8.0
# --------------> The builder image
FROM
node:
$NODE_VERSION
AS
builder
FROM
node:
20.13.1
AS
builder
ENV
NODE_ENV=production
WORKDIR
/usr/src/app
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
dumb-init
ARG
NPM_TOKEN
COPY
package*.json /usr/src/app/
RUN
echo
"//registry.npmjs.org/:_authToken=
$NPM_TOKEN
"
>
.npmrc
&&
\
npm
install
-g
npm@
$
NPM_VERSION
&&
\
npm
install
-g
npm@
$
10
.8.0
&&
\
npm ci
--omit
=
dev
&&
\
rm
-f
.npmrc
# --------------> The production image
FROM
node:
$NODE_VERSION
-slim
AS
production
FROM
node:
20.13.1
-slim
AS
production
ENV
NODE_ENV=production
WORKDIR
/usr/src/app
COPY
--from=builder /usr/bin/dumb-init /usr/bin/dumb-init
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment