Skip to content

Commit 237c201

Browse files
authored
Merge pull request #271623 from tomvcassidy/containerImageFix
fixing incorrect container image
2 parents a00947b + 3df638d commit 237c201

File tree

1 file changed

+75
-2
lines changed

1 file changed

+75
-2
lines changed

articles/container-instances/container-instances-volume-gitrepo.md

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,81 @@ To mount a gitRepo volume when you deploy container instances with an [Azure Res
6767

6868
For example, the following Resource Manager template creates a container group consisting of a single container. The container clones two GitHub repositories specified by the *gitRepo* volume blocks. The second volume includes additional properties specifying a directory to clone to, and the commit hash of a specific revision to clone.
6969

70-
<!-- https://github.com/Azure/azure-docs-json-samples/blob/master/container-instances/aci-deploy-volume-gitrepo.json -->
71-
[!code-json[volume-gitrepo](~/resourcemanager-templates/container-instances/aci-deploy-volume-gitrepo.json)]
70+
```json
71+
{
72+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
73+
"contentVersion": "1.0.0.0",
74+
"variables": {
75+
"container1name": "aci-tutorial-app",
76+
"container1image": "mcr.microsoft.com/azuredocs/aci-helloworld"
77+
},
78+
"resources": [
79+
{
80+
"type": "Microsoft.ContainerInstance/containerGroups",
81+
"apiVersion": "2021-03-01",
82+
"name": "volume-demo-gitrepo",
83+
"location": "[resourceGroup().location]",
84+
"properties": {
85+
"containers": [
86+
{
87+
"name": "[variables('container1name')]",
88+
"properties": {
89+
"image": "[variables('container1image')]",
90+
"resources": {
91+
"requests": {
92+
"cpu": 1,
93+
"memoryInGb": 1.5
94+
}
95+
},
96+
"ports": [
97+
{
98+
"port": 80
99+
}
100+
],
101+
"volumeMounts": [
102+
{
103+
"name": "gitrepo1",
104+
"mountPath": "/mnt/repo1"
105+
},
106+
{
107+
"name": "gitrepo2",
108+
"mountPath": "/mnt/repo2"
109+
}
110+
]
111+
}
112+
}
113+
],
114+
"osType": "Linux",
115+
"ipAddress": {
116+
"type": "Public",
117+
"ports": [
118+
{
119+
"protocol": "tcp",
120+
"port": "80"
121+
}
122+
]
123+
},
124+
"volumes": [
125+
{
126+
"name": "gitrepo1",
127+
"gitRepo": {
128+
"repository": "https://github.com/Azure-Samples/aci-helloworld"
129+
}
130+
},
131+
{
132+
"name": "gitrepo2",
133+
"gitRepo": {
134+
"directory": "my-custom-clone-directory",
135+
"repository": "https://github.com/Azure-Samples/aci-helloworld",
136+
"revision": "d5ccfcedc0d81f7ca5e3dbe6e5a7705b579101f1"
137+
}
138+
}
139+
]
140+
}
141+
}
142+
]
143+
}
144+
```
72145

73146
The resulting directory structure of the two cloned repos defined in the preceding template is:
74147

0 commit comments

Comments
 (0)