Our dockerfile creates the application environment (e.g. env variables, install libraries with apt-get etc.). It also pulls and copies the python application code from its git repo.
However, we are debating whether the application tests (some unit, some integration) should be put within a docker RUN
command (e.g. RUN /bin/bash -c "source activate cool_env; pytest"
) or after the build using the CI stack (e.g. Jenkins, Openshift) to execute the tests on the built container.
What are the pros and cons of each?