Launching Windows inbound agent in ECS Fargate

Hello!
Has anyone run into this error when launching a Windows inbound agent using AWS ECS Fargate?
I keep getting this error when trying to launch any of the Windows inbound-agent images at: Docker Hub

CannotCreateVolumeError: unsupported: Dockerfile contains VOLUME instruction

Trying these images with the same error

  • jenkins/inbound-agent:windowsservercore-ltsc2019
  • jenkins/inbound-agent:jdk8-windowsservercore-ltsc2019
  • jenkins/inbound-agent:jdk11-windowsservercore-ltsc2019

Even tried all the ones tagged with “nanoserver” and variations of “jdk8” and “jdk11”. Same error. The Linux agents work fine.

Task Definition JSON (some parts redacted)

"containerDefinitions": [
        {
            "name": "jenkins",
            "image": "jenkins/inbound-agent:windowsservercore-ltsc2019",
            "cpu": 0,
            "links": [],
            "portMappings": [],
            "essential": true,
            "entryPoint": [],
            "command": [],
            "environment": [],
            "environmentFiles": [],
            "mountPoints": [],
            "volumesFrom": [],
            "secrets": [],
            "dnsServers": [],
            "dnsSearchDomains": [],
            "extraHosts": [],
            "dockerSecurityOptions": [],
            "dockerLabels": {},
            "ulimits": [],
            "logConfiguration": {
                "logDriver": "awslogs",
                "options": {
                    "awslogs-create-group": "true",
                    "awslogs-group": "/ecs/test-windows-3",
                    "awslogs-region": "us-east-1",
                    "awslogs-stream-prefix": "ecs"
                },
                "secretOptions": []
            },
            "systemControls": []
        }
    ],
    "family": "test-windows-3",
    "networkMode": "awsvpc",
    "revision": 1,
    "volumes": [],
    "status": "ACTIVE",
    "requiresAttributes": [
        {
            "name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
        },
        {
            "name": "ecs.capability.execution-role-awslogs"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.17"
        },
        {
            "name": "com.amazonaws.ecs.capability.task-iam-role"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
        },
        {
            "name": "ecs.capability.task-eni"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
        }
    ],
    "placementConstraints": [],
    "compatibilities": [
        "EC2",
        "FARGATE"
    ],
    "runtimePlatform": {
        "cpuArchitecture": "X86_64",
        "operatingSystemFamily": "WINDOWS_SERVER_2019_CORE"
    },
    "requiresCompatibilities": [
        "FARGATE"
    ],
    "cpu": "2048",
    "memory": "4096",

Was able to resolve this by manually building the windows agent using docker-agent/Dockerfile at 4d8ce1e7a192e7fffb2e7a168332a1dbe554f386 · jenkinsci/docker-agent · GitHub
and removing the Volume directives. I guess Fargate is not compatible with Volume. Then rebuild docker-inbound-agent/Dockerfile at 93c202459561b673356586355805d748f0d24881 · jenkinsci/docker-inbound-agent · GitHub on top of it.

@d40sithui I was trying to implement same thing. By any chance do you have working docker image in docker hub?

Hello @radhavkrishna987 and welcome to this community.

Are you facing the same issue as @d40sithui or are you afraid you could face it?
Thanks.

Hi @poddingue. thanks for responding. I have created image without volume and when I tried to launch a windows task, i’m seeing this error “resource never entered the desired state as it failed” and task is being stopped before coming online.

Does your image work with a local Windows docker agent?

@d40sithui can you please share your Dockerfile for this?