Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 662 Bytes

docker.md

File metadata and controls

23 lines (14 loc) · 662 Bytes

Docker cheatsheet

Running in a one-time container

To make sure your container is removed when the task completes:

docker-compose run --rm my-service
docker run --rm my-image

Clean up things no longer in use

docker system prune -a

Type Ctrl+p then Ctrl+q. It will help you to turn interactive mode to daemon mode.

See https://docs.docker.com/engine/reference/commandline/cli/#default-key-sequence-to-detach-from-containers:

Once attached to a container, users detach from it and leave it running using the using CTRL-p CTRL-q key sequence. This detach key sequence is customizable using the detachKeys property. [...]