Batch icon indicating copy to clipboard operation
Batch copied to clipboard

`ContainerInvalidSettings` when using `--pull=always`

Open JulesHuisman opened this issue 3 years ago • 3 comments

When launching a task with container_run_options='--rm --pull=always --workdir=/app'. The task fails with a ContainerInvalidSettings error. Saying the --pull=always is not valid. Is this behaviour blocked on purpose, or is this a bug?

image

JulesHuisman avatar Oct 07 '22 15:10 JulesHuisman

I just checked the sources and it is indeed not parsed which is generating the error. I will check with the author if this was on purpose. I suspect it may be since when using containers in batch the pull is actually done outside of the "docker run" command. Container pulls happen at the VM level or at the task level when you specify which container to execute in. Batch will pull the container for you prior to invoking the docker run on behalf of your task.

staer avatar Oct 07 '22 15:10 staer

Thanks for the quick response! It is probably a bit of a niche use case. As we want to keep one VM running for quicker response times, however this means the docker image could be updated in the meantime. So just to be safe I would like the tasks to always pull the latest image.

JulesHuisman avatar Oct 07 '22 16:10 JulesHuisman

Ah ok, this makes sense as the way the implementation currently works is to just check locally for the container image, and if it doesn't exist pull it. Your use case makes sense though.

staer avatar Oct 07 '22 17:10 staer