we are trying to limit the docker resource on agents that we use to run bamboo jobs, we have different agents (VM and EC2 instance) running ubuntu and these agents have different memory capacity and we have a environment variable in each agents that has maximum value that can be used by docker in that respective agent example docker_maxmemory=14436m (14GB). Now we are passing an extra argument to docker run command from bamboo like this "--memory $docker_maxmemory" here $docker_maxmemory is variable that has some value but bamboo pass it as string instead of variable and we are getting error like this " invalid argument "$docker_maxmemory" for "-m, --memory" flag: invalid size: '$docker_maxmemory' " Note : bamboo runs the job in docker container
Hello @Sanjeevi ravi,
Welcome to Atlassian Community!
As stated on the Docker configuration page:
"The input is not parsed by Bamboo"
Meaning you need to either add the value of the memory property manually or run the Docker task as a command line using a Script task in case you need a customised memory setting.
Kind regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Hi @Eduardo Alvarenga
Thanks for the answer
But the Script task from the bamboo will run inside the docker container we can not limit the container from inside.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sanjeevi ravi
Yes. The Job will have to be configured as an "Agent environment" and not as a "Docker environment" for that to work from a Script task.
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.