Which docker images are save to remove?

Matthias
Matthias Dataiku DSS Core Designer, Registered Posts: 3

I notices that docker images make up a significant amount of disk usage of my dataiku vm.

The only other place I found a mention of it was https://community.dataiku.com/t5/General-Discussion/Remove-docker-image-old-version/m-p/13147

I wonder which docker images are safe to remove.

If I understand correctly the only place the docker images are used is in kubernetes and there they are pulled from my external container registry. Does this in turn mean that I can remove all images but the ones I specify in my container configurations (because I need those to base the build of new images on)? (Well this might mean longer build times but I am not concerned with this).

Thanks,

Matthias

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,212 Dataiker
    Answer ✓

    Hi @Matthias
    ,

    You can use the macro to remove old images that have tags with older versions. These are safe to remove https://knowledge.dataiku.com/latest/admin-operating/project-maintenance/index.html#remove-old-container-images

    As docker uses layers shared between images, the actual disk space usage is not significant for having the images locally.
    You can run to confirm disk space usage additional images use very little disk space since they are based on the same base images. Runl

    docker system df -v
    https://docs.docker.com/engine/reference/commandline/system_df/

    The base images(container-exec,api-deployer,spark ) will always need to be present locally in docker as these are used to create/update images. Deleting these from docker will result in failures, and you will have to rebuild the base images again.

    As mentioned in the mentioned thread you are free to perform other pruning to reclaim disk space for example:


    docker builder prune

    Based on the results from docker system df -v.


    Thanks,

Setup Info
    Tags
      Help me…