sources:
- https://www.youtube.com/watch?v=nH47lsxvY9c
- https://github.com/gabboraron/Play_with_Docker_Classroom
Commands:
docker build . -t gabboraron/nodewebapp:v1
docker images
>docker run -d -p 8001:8080 gabboraron/nodewebapp:v1
- open the link in browser: http://localhost:8001
- stop it with
docker stop <CONTAINER ID>
- start again with
docker start <CONTAINER ID>
- to use the system of docker what we created and log in use
docker exec -it <docker container ID> /bin/sh
- to exit from the container just use
exit
- to mount the current directory to the docker use
docker rm <container ID>
to remove the container name from your docker and usedocker run -d -p 8001:8080 -v %cd%:/app --name <containername> gabboraron/nodewebapp:v1
to bind it to the live docker image.