Hi,
I'd like to run a custom initialization script in my remote agent's docker container at startup time.
The goal is to define an agent capability value that cannot be determined at the time the image is built -> I can't just invoke bamboo-update-capability.sh in the Dockerfile.
The docker image for the agent is based on https://hub.docker.com/r/atlassian/bamboo-agent-base, which has been built for extensibility, but unfortunately doesn't provide a way to do what I want.
Ideally the entrypoint script could check a folder for custom scripts and then just execute them, similar to what other popular images like the postgres image do (see section 'Initialization scripts', entrypoint script source).
With something like this in place I could just copy my custom script via my Dockerfile and then the standard entrypoint script would run it before it starts the agent process, for example:
COPY custom-init.sh /docker-entrypoint-initagent.d/
Currently the only way to achieve something like this would be to replace either pre-launch.sh or entrypoint.py, which is bad because I'd need to manually copy the content from the original files whenever I build a new image version.