Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Running commands prior to docker calls #124

Open
chayim opened this issue Dec 9, 2021 · 1 comment
Open

Question: Running commands prior to docker calls #124

chayim opened this issue Dec 9, 2021 · 1 comment

Comments

@chayim
Copy link

chayim commented Dec 9, 2021

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.

@dcrosta
Copy link
Member

dcrosta commented Jan 17, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants