Navcontainerhelper: Flush-BCContainerHelper deletes images used by stopped containers

Created on 7 Apr 2021  路  3Comments  路  Source: microsoft/navcontainerhelper

Describe the issue
Hi,

we use the Flush-ContainerHelperCache function with -keepdays 14 on central host. The cmdlet deletes images from containers that are exited longer than 14 days but still exist on the host. So after 14 days you can't start the container anymore.
I would consider this as a bug, as the image is still in use by the exited container and therefore should not be removed by the cmdlet. Correct me if im wrong :)

Screenshots
Error when you try to start a container -> the image is missing
123

Additional context
Do you maybe have an idea how to fix container which broke because of this problem?

bug Fix Ready Ships in a future version

Most helpful comment

Shipped in 2.0.11

All 3 comments

I see this as a bug as well.
I must admit I never tried this and I did expect docker to NOT remove images in use by stopped containers.
Unfortunately, there is no way you can create the image again and get your container back.
If the container contained anything, which you absolutely need, you might be able to find it in the programdata\docker\windowsfilter - but not certain.

I will investigate whether I can fix this.

Thanks for the quick reply! I already thought so that you can't get it back.
A fix would be much appreciated, otherwise we sure will find a workaround :)

Shipped in 2.0.11

Was this page helpful?
0 / 5 - 0 ratings