sparse-intern-71089
11/30/2021, 8:33 PMlittle-cartoon-10569
11/30/2021, 8:42 PMhostPath
propoerty.little-cartoon-10569
11/30/2021, 8:43 PMlittle-cartoon-10569
11/30/2021, 8:46 PMlittle-cartoon-10569
11/30/2021, 8:49 PMlittle-cartoon-10569
11/30/2021, 8:51 PMalert-candle-88851
12/01/2021, 12:24 AMMountPoint
interface at the container level, and not, as I think I’m understanding from you, the TaskDefinitionVolumeArgs
, at the TaskDefinition level.
In making those changes, I also went ahead and updated my packages - in case that has anything to do with it.
My updated stack now looks like this:
new awsx.ecs.FargateService('ecs-name', {
name: `resource-name`,
cluster: cluster,
taskDefinitionArgs: {
// ...
containers: {
containerName: {
// ...
mountPoints: [
{
sourceVolume: 'volume1',
containerPath: '/var/run/docker',
readOnly: true,
},
{
sourceVolume: 'volume2',
containerPath: '/host/proc/',
readOnly: true
},
{
sourceVolume: 'volume3',
containerPath: '/host/sys/fs/cgroup',
readOnly: true
}
]
}
}
},
volumes: [
{
name: 'volume1',
hostPath: '/var/run/docker.sock:/var/run/docker.sock:ro'
},
{
name: 'volume2',
hostPath: '/proc/:/host/proc/:ro'
},
{
name: 'volume3',
hostPath: '/sys/fs/cgroup/:/host/sys/fs/cgroup:ro'
}
]
// ...
})
Did I follow your logic there? I’m now noticing that Fargate doesn’t let me reference the host. Here is the error:
aws:ecs:TaskDefinition (ecs-datadog):
error: 1 error occurred:
* ClientException: Fargate compatible task definitions do not support sourcePath
Could what you’re saying be true for regular ECS taskDefinitions, but perhaps not for Fargate? I have previously had to create EFS volumes, for instance, in order to get the volumes to work. Am I seeing this wrong? Again, thank you very much! 🙏little-cartoon-10569
12/01/2021, 12:34 AMlittle-cartoon-10569
12/01/2021, 12:35 AMhostPath
values are suffering from some copyPasta.. They should contain a path on the host machine, not a bind pattern. So just the bit up to and excluding the first colon.alert-candle-88851
12/01/2021, 12:36 AMalert-candle-88851
12/01/2021, 12:41 AMlittle-cartoon-10569
12/01/2021, 12:48 AM