We have a Dockerized PHP application that we currently test, build and deploy to Elastic Beanstalk using 1.0.
I’m now looking at rewriting the CircleCI builds completely for 2.0, mainly in the hope that it will be less hacky from a docker perspective. I have to admit I am finding the 2.0 documentation a real struggle. There seems to be so much ambiguity especially regarding
setup_remote_docker and quite what runs where once that has been called.
Anyway, my plan is to setup a workflow of three jobs with self-explanatory names:
build job will:
setup_remote_dockerand build the application from a Dockerfile.
test job will:
- Use the built image from
buildas the primary container (and a mysql container as a secondary)
- Run some tests
deploy job will:
- Push the docker image that was built in the
buildjob to DockerHub
- Deploy that image to Elastic Beanstalk.
My question is, will the built image from
build even be available to the
deploy jobs, or will it only be available in the remote docker environment which will be torn down by then? Note that I don’t intend to push it to DockerHub at the end of the
build job and then pull it down for the
deploy jobs as that seems unnecessary (and slow)
As a slight aside, any comments on whether this is a sane pipeline would be gratefully received.