Remove docker image old version

RSalerno Partner, Registered Posts: 4 Partner


I have a question about docker images. through a scenario, I activate a machine learning flow that returns the classification results and pushes the model to be deployed directly to the deployer API. If a subsequent run of the scenario reports a model that performs better, this new model will also be pushed to the API deployer. At this point, I'll manually update the service with the new model in the API deployer section.

Everything works, but I realize that the image of the old version remains inside the docker memory and this affects the VM memory a lot (I specify the path of the weighted folder: var / lib / docker / overlay2).

with manual deletion, via the docker command, it is possible to solve the problem, but I would like to know if there was a way to be able to delete the images directly from dataiku, or if there was a way to perform the deletion at the time of update of the new version.

I tried the "delete old images" macro, but as the images keep the tag, they are not deleted.

thanks a lot


  • AndrewM
    AndrewM Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 20 Dataiker

    Hello RSalerno,

    I assume you are talking about hard drive space usage and not RAM. Yes, when a new image is being created, as well, as new container started based on this image, the old ones still remain present and taking space. While Docker provides it's own commands to clean up objects to reclaim space, you still need to do this manually or with some kind of bash scripts + cron tasks to automate that.
    DSS just uses Docker engine as a container runtime and does not maintain it. Yes, we have a macro to delete older images but this will only work if you are DSS8.0.4 for example (and current tags are dss-8.0.4), the older images will be removed. But the rest is pure Docker maintenance that should be done by the system admin. You can check on Docker official docs about cleaning up unused objects here: and I found a great article describing tips to maintain Docker system here:

    Thank you

    Andrew M

Setup Info
      Help me…