Cheatsheets

Docker

CommandsDescriptions
docker pull [image]:[tag]Pulls an image from a registry.
Eg. docker pull php:7.3 will pull an image of PHP version 7.3
docker build .Build an image from a Dockerfile
docker build -t <tag> .Build an image and assign it a tag. Eg., docker build -t myapp:v1 .
docker psList all running containers
docker ps -aList all containers including stopped containers
docker container pruneRemove all stopped containers
docker cp <container id>:<file path within container> <host path>Copy file from container to host. Eg., docker cp app-postgres:/tmp/backup.sql ~/