Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How do you test your docker images/docker-compose deployments?
2 points by coaxial on Feb 11, 2018 | hide | past | favorite | 3 comments
When I'm writing docker services or docker images, I have to test it all manually and hope for the best.

But it's tedious and error-prone. Ideally, I'd want to check that a specific file is there with specific contents, or that when launching a container I can access a specific URL, etc.

What do you use for CI testing of Docker images and Docker services? Is there a best practice for doing that?




I would recommend following the Docker Cloud approach: https://docs.docker.com/docker-cloud/builds/automated-testin...

It basically boils down to creating a docker-compose file for testing, and then running tests in it. How you run those tests is pretty much dependent on the type of service you run.

You may also want to institute health checks, either within Docker / Kubernetes, or full service monitoring from the outside.


Thank you, I'm looking for something free, it's for a side project.


It's free if it's open source. You could also use the same approach and run the test compose yaml file on your desktop/laptop, you don't need to use the Docker cloud for that. You could also integrate the same mechanism with Gitlab.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: