Skip to content

Instantly share code, notes, and snippets.

@denis-shvets
Last active January 14, 2017 01:11
Show Gist options
  • Save denis-shvets/d199b5bb30a8b29e02d8 to your computer and use it in GitHub Desktop.
Save denis-shvets/d199b5bb30a8b29e02d8 to your computer and use it in GitHub Desktop.
Docker commands
# Build Dockerfile from current path
docker build -t <image_name> .
# Run Docker image
docker run --restart=always --name <instance_name> -dt -p 0.0.0.0:<local-port>:<server-port> <image_name>
# Stop Docker image
docker stop <instance_name>
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
# IP
docker-machine ip
# VM
docker run --restart=always --name watty.io -dt -p 80:7000 watty.io
docker run --restart=always --name webview.live-view -dt -p 102:7020 webview.live-view
docker run --restart=always --name webview.appliances-on -dt -p 103:7030 webview.appliances-on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment