I have my tests set up to start two Docker containers: one for my app, and a second System Under Test container that makes HTTP requests against the app container. The two of these are configured in a docker-compose.test.yml
file. Then if tests are successful, I push to Amazon ECR and deploy (“update the task definition”) in Amazon EC2 Container Service.
This is similar to how Docker Cloud does automated testing, except that I deploy to ECS instead of Docker Cloud.
Meanwhile, CircleCI 2.0 is cool, and runs things with Docker itself, but has a complex process if you want to build and push Docker images for deployment. Also, it expects jUnit-style XML output.
So this Dockerfile installs:
- the main docker CLI client and docker-compose
- nodejs and the tap-xunit converter
- the ecs-deploy helper script, with its dependencies awscli and jq