When I do docker run
I have to give extensive argument options for my container setup. To mitigate this and ensure all developers are using the same arguments I switched to docker-compose.
Now when I try to go run the same build from jenkins I can no longer use the docker plugin since no jenkins plugins seem to support docker-compose up
, they all need to use the docker
commands for the remote API instead of the docker-compose
commands.
Unless there are reasons not to, I would prefer docker-compose up
. I am aware I could create a bash script the does docker run <arguments>
and let my jenkinsfile parse the script and load in the proper args but this feels ultra hacky.
How can I use one or the other and keep them both in SCM and ensure that if a change is made to docker source (either the docker-compose.yml
or possible a bash script running docker run
with the proper arguments), it will work in both places? Are there tools for this? a plugin I am missing?
Also I desire to use CoreOs which doesn't natively support jenkins (no java and other things).