-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsteps.txt
More file actions
28 lines (27 loc) · 700 Bytes
/
steps.txt
File metadata and controls
28 lines (27 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
mkdir node-image
cd node-image
npm init -y
npm install express
#Crear index.js i ficar codi
#Executar aplicació
node index.js
#Crear Dockerfile i configurar
#Crear Docker
docker build -t node-app-image .
#Llistar imatges
docker image ls
#Borrar imatges
docker image rm <id>
#Executar contenidor
docker run -p 3000:3000 -d --name node-app node-app-image
#Llistar contenidors executant-se
docker ps
#Borrar contenidor
docker rm node-app -f
#Terminal contenidor docker
docker exec -it node-app bash
#Crear .dockerignore
#Configurar contenidorper actualitzar amb desenvolupament
docker run -v $PWD:/app -p 3000:3000 -d --name node-app node-app-image
#Instal·las nodemon
npm install nodemon --save-dev