tox-docker
tox-docker copied to clipboard
Question: Running commands prior to docker calls
I have a series of dockers I'd like to run, and each require some very light configuration, prior to triggering them. Is there any way to run commands, prior to the dockers starting, for a tox environment?
I tried adding commands_pre but that runs after the dockers are initialized. Is there something else I'm missing that works? While I can hack things together with this plugin it feels like this should be something in tox-docker.
Do you need to run the commands inside or outside the container? For commands inside the container, you should use a custom Dockerfile
to have the container do what you need. (In a pinch, you could probably find a way to abuse the healthcheck to do this as well, although that's not the intent of that feature, either in tox-docker or docker itself)
If you need to run commands outside the container, can your CI system invoke those commands before running tox?