Last active
November 27, 2019 19:02
-
-
Save elton-fonseca/3519fb32e5f74c0a4c25df8908b8e4da to your computer and use it in GitHub Desktop.
Basic Docker commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Informations about docker versions | |
docker version | |
# Informations about docker | |
docker info | |
# See images | |
docker image ls | |
# Manager images | |
docker image command | |
# manager container | |
docker container command | |
# Run container | |
docker container run --name container-name -d --publish host-port:container-port image-name | |
# See running containers | |
docker container ls | |
# See all containers | |
docker container ls -a | |
# Stop container | |
docker container stop container-id | |
# Remover container | |
docker container rm container-id | |
# See container log | |
docker container log container-id | |
# Access container iterative bash | |
docker exec -it container-name bash | |
# Get image by version | |
docket image pull image-name:version | |
# See image details | |
docker image inspect image-name | |
# See image layers | |
docker image history image-name | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment