My Notes for Docker

PHOTO EMBED

Thu Oct 07 2021 12:02:59 GMT+0000 (UTC)

Saved by @kp7860 #docker

docker build -t <image-name>
  
docker run -d -p <public-port>:<image-port> <image-name>
  
docker run -it <image-name> sh
content_copyCOPY

line 1: build docker -t (tag) line 3. Run Docker image Note: -p (publish), -d (in detach mode), public-port (port for using outside container), image-port (the port which is used to start server in your code insider server.js) line 5. See docker image content using cli (cd or ls) Note: -it stands for interactive shell