If you like at the Dockerfile of the various Jenkins images (like the official _/jenkins
one), you will see why jenkins "runs automatically":
COPY jenkins.sh /usr/local/bin/jenkins.sh
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
(tini
is a script to adopt zombie processes, which is an issue I presented before in "Use of Supervisor in docker")
So it depends on the ENTRYPOINT
of your Dockerfile: it should include the right command to start Jenkins.
Also you can either use supervisor or entrypoint in your docker file.
No need to use supervisor: that is what tini is for in the official image.
If I use the official jenkins image, which is configured to run jenkins automatically, I suppose I could install Locustio and start it with 'docker exec' afterwards, right?
You wouldn't install Locusto in the same image, or you wouldn't use docker exec
to run it in the Jenkins container (docker exec
is for opening a session mainly for debug purpose)
You would use a Locust.io image to run a second container.
If jenkins needs locust.io, you could run locust.io first, then run jenkins with --link
directive.