Skip to content

Instantly share code, notes, and snippets.

@maheshkumargangula
Last active September 26, 2017 18:23
Show Gist options
  • Save maheshkumargangula/6dbb2443c6aba2d4e9afde67ecc02fdf to your computer and use it in GitHub Desktop.
Save maheshkumargangula/6dbb2443c6aba2d4e9afde67ecc02fdf to your computer and use it in GitHub Desktop.
# To list images
docker images
# To list containers
docker ps -s
# To build Dockerfile
docker build -f Dockerfile . -t mahesh/nginx
# To run inline.
docker run -p 80:80 mahesh/nginx
# To run in backround.
docker run -d -p 80:80 mahesh/nginx
# To kill container.
docker kill <container_id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment