Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 728 Bytes

ReadMe.md

File metadata and controls

56 lines (45 loc) · 728 Bytes

Docker commands

Check the installation

docker

Build the image

docker build -t <image-name> .

See docker images

docker images

Run the container

docker run -d -p <host-port>:<container-port> --name <container-name> <image-name>

List the containers

docker ps

Tag the image

docker tag <image-name> <docker-id>/<image-name>

Push the image

docker push <docker-id>/<image-name>

Pull the image

docker pull <docker-id>/<image-name>

Stop the container

docker stop <container-name>

Remove the container

docker rm <container-name>

Remove the image

docker rmi <image-name>