Few usefull cmd for easier docker managment:
- To delete all errored out container:
docker rm $(docker ps -q -f status=exited).
- To force container keep running without exit:
tail -f /dev/null.
- Sometime you may have error
X509: certificate signed by unknown authority docker errorwith wellknown CA signed certs, add cert locally to get rid of it:
$ sudo mv registry.example.com.crt /usr/local/share/ca-certificates # update global certificates definitions $ sudo update-ca-certificates # restart affected services $ sudo systemctl daemon-reload $ sudo systemctl restart docker
docker save -o <path for generated tar file> <image name>to save local docker image and scp to other host, then
docker load -i <path to image tar file>to load docker image with an old tag.