This repository explores all the typical Docker-related operations within CI builds.
In these samples, we will be using CircleCI for our CI builds.
Please see the various workflows declared in .circleci/config.yml
for examples.
Some of these examples can really be simplified by using many of the orbs offered by CircleCI! In particular, we could simplify our lives with the powerful Docker orb.
However, in these examples, I would like to keep it as 'low-tech' as possible.
This workflow builds a custom Nginx image, tests that our image can be spin up before publishing to a image repository (Docker Hub in this case).
Bonus: We also take a screenshot of the custom Nginx server's web page here
The published image is hosted in Docker Hub.
Features:
docker image build
docker container run
- dockerize tool
docker image push
docker cp
This workflow spins up 2 containers of a fictional service (1 DB, 1 web app) via Docker-Compose, and runs integration tests (Newman) against the web app.
Features:
docker-compose -p ${prefix} up
nc
command as an alternative to check if server is up- Postman collections
- Newman