Last active
June 8, 2022 15:07
-
-
Save tertek/fd0dfb872643406234a5ae7322fdbb24 to your computer and use it in GitHub Desktop.
Useful 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
# Clear Build Cache | |
# https://docs.docker.com/engine/reference/commandline/builder_prune/ | |
$ docker builder prune | |
# Remove Image | |
# https://docs.docker.com/engine/reference/commandline/image_rm/ | |
$ docker image rm IMAGE | |
# Run docker build with output to console | |
# https://stackoverflow.com/a/69524819/3127170 | |
$ docker build --progress=plain --no-cache . | |
# Execute commands inside container | |
$ docker exec <container-id> <cmd> | |
# List Containers and see ID, IMAGE, etc. | |
$ docker ps | |
# Show mountpoint of Docker volume | |
$ docker volume inspect todo-db | |
$ Show logs of comntainer | |
docker logs -f <container-id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment