-
Notifications
You must be signed in to change notification settings - Fork 39
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
Pass arguments to docker container #159
Comments
I'm not clear on why you need to pass As it stands in 4.1.0, your best bet is to use a multi-stage Dockerfile and use |
From what I can tell, it seems that the current design centers around starting a container that has some application that we want to test, say by hitting an API endpoint listening on a port. In this scenario I wish to create a docker image that has all the required software to run tests as if they were being ran locally. That is done by executing a single command and when it's done the container exits. So currently the tox.ini has this for the command part (sorry should've added that to the original request), pared down:
So a user can run The
At the moment I cannot see how I would do that last part of arbitrarily passing arguments to the CMD of the docker container. |
The recent addition of Dockerfile support to build and run container is mentioned as a possible fix for #114 and I wish to understand how this can be used in my use case.
There is an existing tox env that runs the test in the host OS
I have Dockerfile(s) that contains software/environment setup required to run behaviour tests on different PG versions.
As far as I can see from the new feature addition, I cannot pass arguments to CMD to the container when it runs. Mainly I would like to pass
{posargs}
but also I would need to pass build args.I am thinking I would put all of the command line requirements into the entrypoint of the Dockerfile and had something like this:
How do I pass the
{posargs}
in? Where do I define build_args? As it stands now do I need a separate Dockerfile or dockerfile_target for different build options? Am I missing something? Perhaps there is another way to achieve this?Thanks!
The text was updated successfully, but these errors were encountered: