Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
helloworld-ts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hoai-Tri Bernard Huynh
helloworld-ts
Commits
ec6e8652
Commit
ec6e8652
authored
1 year ago
by
Hoai-Tri Bernard Huynh
Browse files
Options
Downloads
Patches
Plain Diff
Add: Dockerfile
parent
20a52545
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+22
-0
22 additions, 0 deletions
Dockerfile
with
22 additions
and
0 deletions
Dockerfile
0 → 100644
+
22
−
0
View file @
ec6e8652
# Étape de build
FROM
node:slim
AS
builder
WORKDIR
/app
# Copie des fichiers de dépendances
COPY
package*.json ./
# Installation des dépendances
RUN
npm
install
# Copie du reste des fichiers du projet
COPY
. .
# Construction du projet
RUN
npm run build
# Étape de run
FROM
node:alpine
WORKDIR
/app
# Copie des artefacts de construction du builder
COPY
--from=builder /app/dist ./dist
COPY
package*.json ./
# Installation des dépendances de production uniquement
RUN
npm
install
--only
=
production
# Commande pour exécuter l'application
CMD
["node", "dist/index.js"]
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