I need to put a pipeline or to have a job that automatically builds my docker images. Same as automated build that docker hub supports with hooks for github or bitbucket.
What do you recommend or already use?
I am thinking on using drone +private docker registry+internal git server (git lab) +/- Jenkins:
the code is updated in git–> the drone automaticaly build my images+??run some tests+?? deploy the images to the registry
Another Question: how do you tests your images before pushing them?
I am thinking to create a temporary docker machine–> build the image in it–> run the container–> run some (application) tests–> push the image
Drone or any sugestions for Image Build Automation when the source code is versioned in an internal git server?
We are doing exactly what you are looking to do now. We are relying on GitLab to handle this for us. We are using githost.io to host our GitLab instance. We are using GitLab CI/CD to automatically handle our builds, testing, and deployment to private Docker registry also hosted in GitLab.
Here’s our flow:
Code pushed to master branch GitLab repo
GitLab builds image using dind
GitLab runs any unit tests using dind
GitLab runs all services using docker-compose using dind
GitLab runs all integration tests on complete environment running using docker-compose
GitLab pushes image into GitLab private registry
GitLab triggers redeploy in Docker Cloud (only for testing/staging environment, production is a manual redeploy)
I can help you out privately to match our environment closer if you’d like.
I did this step by step tutorial for Jenkins and docker pipeline and it seems that will fit your use case.
+1 on gitlab.
I setup a complete build, push deploy pipeline in a few hours.