We're currently using Docker for development and are currently looking at how we can use Docker also to run our software in other environments such as staging and production.
What we do now is that we compile our Java software with Jenkins and then - in the very same Jenkins build - also build a Docker image which the Java software will run in using docker-compose.
Now, after the Docker image has been built we need to get that image over to the (remote) Docker host where the software is to run. This remote Docker host is NOT the same host as the one Jenkins runs on. I believe we can do that by following the accepted answer for this question.
However, once the image has been copied to the Docker Host - how do we start that image with docker-compose
? The image we've copied is just the image - not the docker-compose.yml
files or Dockerfile
for that matter.