Skip to content

Instantly share code, notes, and snippets.

@prantor19
Last active February 14, 2020 06:32
Show Gist options
  • Select an option

  • Save prantor19/e2ad682b925743da42f3d929c3955828 to your computer and use it in GitHub Desktop.

Select an option

Save prantor19/e2ad682b925743da42f3d929c3955828 to your computer and use it in GitHub Desktop.
Common Docker Command
list image:
docker image ls
docker images
list including unnamed image:
docker image ls -a
docker images -a
list running container:
docker ps
list all container:
docker ps -a
remove images:
docker rmi image_name
Docker run attached with tty
docker run \
-p 8080:80 \
--rm \
-ti \
-v /path/to/host/dir:/path/to/target/dir \
image_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment