Only recently (mid-year) discovered Docker. Over the weekend I created a POC build in our Jenkins to deploy our app into a Docker container. It’s a very naive setup: Docker runs on the same machine as Jenkins, and Jenkins just executes pre-build ‘docker build …’ and ‘docker run …’ and post-build ‘docker rmi -f …’ commands. Even though the Docker image is built from a Dockerfile, I do not see this scaling very well. For example, all my Docker containers run on localhost:same_port.
The Jenkins machine runs in Amazon’s EC2.
I am not looking for a packaged solution from the community, but a pointer what do I look at next? What is the correct direction that I want to go? Any examples / tutorials of a setup that are considered best practices?
TIA for any help.
Use Jenkins to push the images that it creates to a docker repository (eg hub.docker.com), then you can get any other docker hosts to pull down the image and run it.
If you link Docker Cloud to your AWS account, you can get it to run you docker containers on your EC2 instances.
Thank you for the reply.
I guess I was unclear on what is the top “thing” that runs all of this in a pure CI/CD build system. I spoke with some colleagues (past and present) and apparently this main thing is usually Jenkins.
Since we are currently using EC2, the next direction that I am going to take explore is the EC2 Container Service, which I need to have Jenkins talking to. Found some training online for this.
Again, thank you.