Skip to main content

Cheat Sheet

Build image

docker build --tag <username>/<app_name> .

Create and run container from image

docker run --name <app_name> -p <container_port>:<host_port> -d <username>/<app_name>

Start container

docker start <app_name>

Restart container

docker restart <app_name>

Stop container

docker stop <app_name>

Delete container

docker rm <app_name>