I am trying to build, save and deploy a docker image on CircleCI, but without pushing the image to Docker Hub. In CircleCI 1.0 I could do so by building the docker image using Maven, then save it using docker save command, and finally deploy it just by uploading the saved docker image file to the deployment server, where it then is loaded and ran.
Now, with CircleCI 2.0, I am struggling with this, as we now have this “remote docker container” where all the Docker specific commands are executed. Therefore, my docker save command runs there, which means that the resulting docker image file is also only available in that remote docker container. Like that I can’t deploy it to my deployment server now, right?
My idea is to just copy the saved docker image from the remote docker container to the main job container where all other CircleCI commands are executed. Afterwards, I should be able to deploy it as usual. Is it possible to do this (copy)? How?
If this is not possible: any other ideas on how I can deploy a build docker image to my server without pushing it to Docker Hub first?
Thanks in advance!