jenkinsci / amazon-ecs-plugin

Amazon EC2 Container Service Plugin for Jenkins
https://plugins.jenkins.io/amazon-ecs
MIT License
192 stars 227 forks source link

CannotCreateVolumeError: unsupported Dockerfile contains VOLUME instruction #334

Open 366-christoforos opened 9 months ago

366-christoforos commented 9 months ago

Jenkins and plugins versions report

CannotCreateVolumeError: unsupported: Dockerfile contains VOLUME instruction

I search in dockerfile but i cannot see any volume anywhere :/

Docker image: jenkins/inbound-agent:windowsservercore-ltsc2019

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins 2.387.3

Reproduction steps

  1. Create a ECS task
  2. Add ECS label
  3. Try to run a job

Expected Results

work with out the error.

Actual Results

break with error message

CannotCreateVolumeError: unsupported: Dockerfile contains VOLUME instruction

Anything else?

no

kristofdho commented 8 months ago

Running into this as well. AWS Fargate does not support docker images which have VOLUME declarations. So these 2 are the offending lines: https://github.com/jenkinsci/docker-agent/blob/798ce6450f7143c341e236e5962becf0b5e1b864/windows/windowsservercore/Dockerfile#L98-L99

They should not be necessary for correct functionality of the agent, so would be nice if they can somehow be optional or removed.