Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Multi-stage Builds and Test results - How to get them?

Apparently, all articles I found about multi-stage builds cover the happy path.

But how to get the test results (e.g. unit or acceptance tests) out of a builder-container when something fails?

like image 723
Arman Avatar asked Apr 11 '18 06:04

Arman


1 Answers

I think that you can do things like

 docker build --target test -t <your_test_image> .

Then you could just run this image with volumes attached and gather results...

More here.

like image 199
kboom Avatar answered Sep 17 '22 14:09

kboom