Skip to content

Instantly share code, notes, and snippets.

@tertek
Last active June 8, 2022 15:07
Show Gist options
  • Save tertek/fd0dfb872643406234a5ae7322fdbb24 to your computer and use it in GitHub Desktop.
Save tertek/fd0dfb872643406234a5ae7322fdbb24 to your computer and use it in GitHub Desktop.
Useful Docker Commands
# 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