1

We are running our application on a DCOS cluster in Azure Container Service. Docker image of our marathon app is approx 7GB. I know this is against best practices but lets keep that debate aside for this question. We pull latest on worker nodes and it takes around 20 minutes, if no running container currently uses this image on a node, it gets deleted from that node by some cleanup routine job. Is there a way to prevent this from happening?

Sean McKenna
  • 3,706
  • 19
  • 19
ckb
  • 290
  • 1
  • 3
  • 9

2 Answers2

1

Amount of time to wait before Docker containers are removed can be set using this flag (this is agent option)

--docker_remove_delay flag

--docker_remove_delay=VALUE The amount of time to wait before removing docker containers (e.g., 3days, 2weeks, etc). (default: 6hrs)

Dino L.
  • 137
  • 8
0

To prevent accidental deletion (or modification) of a resource. You can create a lock that would prevent users from deleting or modifying the resource while the lock is there (even if they have the permissions to delete\modify the resource).

For more details, refer "Lock resources to prevent unexpected changes".

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
  • Thanks for quick response but the question is not related to a user deleting docker image. Instead there is some kind of cleanup job in mesos that deleted docker images which are not used by any running container. – ckb Nov 18 '17 at 16:05