Docker Cheat Sheet

2015-12-17 Tags: docker

Huge thank you to Frank for helping me devop. Run these wherever the Dockerfile is


docker build -t \$USER/\$NAME:\$TAG .


List images:

docker images List running containers: docker ps

Run Container

docker run -it \$IMAGE\_NAME -p \$HOST:\$DOCKER bash

Run Live

If \$TAG is not specified, will use latest

docker run --name \$APP\_NAME -p \$HOST:\$DOCKER \$IMAGE\_NAME:\$TAG

Docker Hub

Pushes image out

docker push \$IMAGE\_NAME:\$TAG 
docker pull \$IMAGE\_NAME:\$TAG