I know that this is not really a bazel specific issue, but how do I build an image, test that image, and then deploy that image? I am currently running tests in bazel, and then I create the image and push it to my repository. Instead of running tests from bazel, I would rather run pytest in a running container.
My problem is that when I define the image that the container uses, it requires a main parameter. I specify my python app for the main,
but when I run the resulting Docker image, it starts up my app, and I don't know how to execute pytest instead.
Hope this makes sense.