Skip to content

Commit 133d1bf

Browse files
authored
CIM_release
1 parent 89f53d7 commit 133d1bf

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Azure Service Fabric container image management
3+
description: How to use container image management in a service fabric cluster.
4+
ms.topic: conceptual
5+
ms.author: shkadam
6+
author: shkadam
7+
ms.service: service-fabric
8+
services: service-fabric
9+
ms.date: 06/22/2023
10+
---
11+
12+
# Container Image Management
13+
When deploying Service Fabric containers, the activation path handles the downloading of the container images to the VM on which the container will be running. Once the containers have been removed from the cluster and their application types have been unregistered, there is a clean up cycle that will delete the container images. This clean up works only if the container image has been hard coded in the service manifest. For existing SF runtime versions the configurations supporting the clean up of the container images are as follows -
14+
15+
## Settings
16+
17+
```json
18+
"fabricSettings": [
19+
{
20+
"name": "Hosting",
21+
"parameters": [
22+
{
23+
"name": "PruneContainerImages",
24+
"value": "true"
25+
},
26+
{
27+
"name": "CacheCleanupScanInterval",
28+
"value": "3600"
29+
}
30+
]
31+
}
32+
]
33+
```
34+
35+
|Setting |Description |
36+
| --- | --- |
37+
|PruneContainerImage |Setting to enable or disable pruning of container images when application type is unregistered. |
38+
|CacheCleanupScanInterval |Setting in seconds determining how often the clean up cycle runs. |
39+
40+
## Container Image Management v2
41+
Starting SF version 10.0 there is a newer version of the container image deletion flow. This flow will clean up container images irrespective of how the container images may have been defined - either hard coded or parameterized during application deployment. PruneContainerImages and ContainerImageDeletionEnabled configuration are mutually exclusive and cluster upgrade validation exists to ensure one or the other is switched on but not both. The configuration supporting this feature are as follows -
42+
43+
### Settings
44+
45+
```json
46+
"fabricSettings": [
47+
{
48+
"name": "Hosting",
49+
"parameters": [
50+
{
51+
"name": "ContainerImageDeletionEnabled",
52+
"value": "true"
53+
},
54+
{
55+
"name": "ContainerImageCleanupInterval",
56+
"value": "3600"
57+
},
58+
{
59+
"name": "ContainerImageTTL",
60+
"value": "3600"
61+
},
62+
{
63+
"name": "ContainerImageDeletionOnAppInstanceDeletionEnabled",
64+
"value": "true"
65+
},
66+
{
67+
"name": "ContainerImagesToSkip",
68+
"value": "microsoft/windowsservercore|microsoft/nanoserver"
69+
}
70+
]
71+
}
72+
]
73+
```
74+
75+
|Setting |Description |
76+
| --- | --- |
77+
|ContainerImageDeletionEnabled |Setting to enable or disable deletion of container images. |
78+
|ContainerImageCleanupInterval |Time interval for cleaning up unused container images. |
79+
|ContainerImageTTL |Time to live for container images once they are eligible for removal (not referenced by containers on the VM and the application is deleted(if ContainerImageDeletionOnAppInstanceDeletionEnabled is enabled)). |
80+
|ContainerImageDeletionOnAppInstanceDeletionEnabled |Setting to enable or disable deletion of expired ttl container images only after application has been deleted as well. |
81+
|ContainerImagesToSkip |When set enables the container runtime to skip deleting images that match any of the set of regular expressions. Each expression must be seperated by the \| character. Ex: "mcr.microsoft.com/.+\|docker.io/library/alpine:latest" - this example will match everything prefixed with "mcr.microsoft.com/" and will match exactly "docker.io/library/alpine:latest". By default we do not delete the known Windows base images microsoft/windowsservercore or microsoft/nanoserver. |
82+
83+
## Next steps
84+
See the following article for related information:
85+
* [Service Fabric and containers][containers-introduction-link]

articles/service-fabric/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
href: service-fabric-docker-compose.md
179179
- name: Probes
180180
href: probes-codepackage.md
181+
- name: Container image management
182+
href: containerimagemanagement.md
181183
- name: Reliable Services
182184
items:
183185
- name: Reliable Services overview

0 commit comments

Comments
 (0)