2022.2 EN DE

    Show / Hide Table of Contents

    Resource Management

    Free up Disk Space via Docker CLI

    1. run docker system df for getting an overview of the disk usage by Docker images and volumes. (The --verbose parameter will print the usage per volume.)
    2. The easiest way is deleting all images and volumes which are not in used by any running container via
      • docker image prune --all and
      • docker volume prune
      • Double check if the container is running in order to avoid deleting data volumes by accident.
    3. If you want to keep volumes from stopped or deleted containers you can use docker volume rm and docker image rm for deleting volumes and images individually or using filters docker volume prune --filter "label!=image_name".
    Tip

    Additional commands for clean-up tasks can be found here: https://linuxize.com/post/how-to-remove-docker-images-containers-volumes-and-networks/

    Move Docker VM Disk Image to another Location

    1. Go to the Docker Desktop Settings - Advanced tab
    2. Change the Disk Image Location in the input field (highlighted below): New Docker VM Disk Image Location

    Troubleshooting

    Docker WSL 2 RAM limitation

    It can happen that Docker with WSL 2 consumes the complete memory of the system, which may lead to instability and/or crashes.
    To limit Docker to use only certain amount of memory (RAM), copy the wslconfig file from attachments to the desired computer. Define the limit in GB.

    [wsl2]
    memory=10GB
    

    The location should be the root of the user, e.g.: C:/Users/Three10

    
    ☀
    ☾
    Back to top
    Generated by DocFX
    ☀
    ☾