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
94a2785d
Commit
94a2785d
authored
1 year ago
by
Dmitriy Safronov
Browse files
Options
Downloads
Patches
Plain Diff
update node version
parent
96b9726e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.devcontainer/devcontainer.json
+1
-1
1 addition, 1 deletion
.devcontainer/devcontainer.json
Dockerfile
+2
-2
2 additions, 2 deletions
Dockerfile
with
3 additions
and
3 deletions
.devcontainer/devcontainer.json
+
1
−
1
View file @
94a2785d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
{
{
"name"
:
"Node.js"
,
"name"
:
"Node.js"
,
//
Or
use
a
Dockerfile
or
Docker
Compose
file.
More
info:
https://containers.dev/guide/dockerfile
//
Or
use
a
Dockerfile
or
Docker
Compose
file.
More
info:
https://containers.dev/guide/dockerfile
"image"
:
"mcr.microsoft.com/devcontainers/javascript-node:0-
18
"
,
"image"
:
"mcr.microsoft.com/devcontainers/javascript-node:0-
20
"
,
//
Features
to
add
to
the
dev
container.
More
info:
https://containers.dev/features.
//
Features
to
add
to
the
dev
container.
More
info:
https://containers.dev/features.
//
"features"
:
{},
//
"features"
:
{},
...
...
This diff is collapsed.
Click to expand it.
Dockerfile
+
2
−
2
View file @
94a2785d
# --------------> The build image
# --------------> The build image
FROM
node:
18.12.1
AS
build
FROM
node:
20.10.0
AS
build
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
dumb-init
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
dumb-init
ARG
NPM_TOKEN
ARG
NPM_TOKEN
WORKDIR
/usr/src/app
WORKDIR
/usr/src/app
...
@@ -9,7 +9,7 @@ RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc && \
...
@@ -9,7 +9,7 @@ RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc && \
rm
-f
.npmrc
rm
-f
.npmrc
# --------------> The production image
# --------------> The production image
FROM
node:
18.12.1
-slim
FROM
node:
20.10.0
-slim
ENV
NODE_ENV production
ENV
NODE_ENV production
COPY
--from=build /usr/bin/dumb-init /usr/bin/dumb-init
COPY
--from=build /usr/bin/dumb-init /usr/bin/dumb-init
USER
node
USER
node
...
...
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