mercredi 3 juillet 2019

Is there a recommended way to test Docker compose file (ideally, deployed as stacks)?

In the philosphy that every piece of software should be tested, is there a way to test a Docker compose file?

We are already aware of the Docker recommended way to test individual containers' Dockerfiles, with a sut service: https://docs.docker.com/docker-hub/builds/automated-testing/

Yet, it is common to then assemble several containers as services of a docker-compose.yml file. Yet, we are not aware of any "recommended" (by the official doc, nor the community) approach to implement such test.


Naïvely, we could write some docker-compose.stacktest.yml along the line of:

version: '3.5'
services:
  stacktest:
    image: my-test-image
    command: test.sh

Then run it something like:

docker stack deploy -c docker-compose.yml -c docker-compose.stacktest.yml tester

Yet we are interested to see if there is something more generally accepted out there?

Aucun commentaire:

Enregistrer un commentaire