A collection of 2 posts

Changing Docker for Windows' default storage directory for containers and images

Windows containers only 2019 update : Doing this via dockerd This shows how we can set D:\ProgramData\docker as our directory rather than the default C:\ProgramData\docker by utilizing dockerd CLI's --data-root option which sets the "Root directory of persistent Docker state". See their API for further options sc stop docker cd "C:\Program Files\Docker\Docker\Resources" .\dockerd.exe --unregister-service .\dockerd.exe --register-service --data-root "D:\ProgramData\docker" sc start docker docker info ...

Useful Docker commands

Useful docker commands Cleaning up PS > docker system prune WARNING! This will remove: - all stopped containers - all networks not used by at least one container - all dangling images - all build cache Are you sure you want to continue? [y/N] Stop and remove all containers docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) Commit changes to container and showing history for an image # Create a new image based on changes in ...