V
V
VITYA-XY12019-10-04 23:23:18
GitLab
VITYA-XY1, 2019-10-04 23:23:18

How to test a Docker container? Are there ready-made unit tests for GitLab?

Hello
Newbie in CI/CD and everything connected with it.
Are there any best practices on how to test the health of a container in the gitlab pipeline?
Well, i.e. I built the container through runner and then how to check its performance?
Raise the container from the image, check the curl and then extinguish?
And if the build of the curve and the service did not start or gives the 500th one, but nevertheless the container is running and occupies the port, and I fix the service and push the changes, but then CI swears "they say the port is busy", I can’t hurt the container for the test, then it exits you need to test the docker before the build, why then do the tests ...
Gentlemen DevOps. Can someone enlighten me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2019-10-05
@VITYA-XY1

Healthcheck
You can run for the test without occupying ports.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question