-
Bug
-
Resolution: Fixed
-
Low
-
7.2.2
-
None
-
2
-
Severity 3 - Minor
-
Issue Summary
https://hub.docker.com/r/atlassian/bamboo-agent-base says it's possible to pass VM_OPTS to the container and they will be respected by the agent. However, even though this env var is passed to java -jar command, props are set for the wrapper JVM, not the agent. As a result, the only way to override props is to mount an entire conf file, which isn't a very container friendly approach
Steps to Reproduce
- Run agent container according to docs on DockerHub, with -e VM_OPTS
Expected Results
Xmx or Xms are overridden for the agent process.
Actual Results
Java opts are overridden for the wrapper JVM only and the agent starts with default hardcoded settings.
Workaround
One can build own image, and execute bamboo-agent.jar rather than installer jar (use now wrapper).
FROM atlassian/bamboo-agent-base:latest
ADD bamboo-agent-7.2.2.jar
then
docker build -t registry/repo:tag .
Add 2 envs to docker run to override jar location and pass VM_OPTS
-e AGENT_JAR=/home/bamboo/bamboo-agent-7.2.2.jar -e VM_OPTS="-Xmx2048m"
Alternatively, since an entire Bamboo home is mounted, one can edit the file, but that's not a great solution in a containers world.
Looking at https://hub.docker.com/r/dchevell/bamboo-base-agent and what's happening there, it turns out conf file is generated from a template and some props are substituted with env var values.
any idea when this gets resolved? We're still waiting for a solution.