kesto.de Cheatsheets

Docker

Build

docker build -t example .

Run (with port forwarding + automatic restart)

docker run -p 127.0.0.1:3000:3000 --restart unless-stopped --detached --name example example

Run (with bind mount)

docker run -i -t -v /path_on_host_to/app:/app example

Remove not running containers

docker container prune

Remove unused images

docker image prune

Save image to archive

docker save example > example.tar

Load image from archive

docker load < example.tar