tox-dev / tox-docker

A tox plugin to run one or more Docker containers during tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add options to override CMD for container

thenewguy opened this issue · comments

It would be helpful to specify the command that should be used for running the container.

This is the example image from my use case

The container exposes several commands via one docker image for testing purposes - in this particular case - I want to run ippeveprinter but there is no way to add it.

I believe it should be simply adding the option and passing it along at

container = docker.containers.run(

This isn't supported exactly as requested, but 4.1.0 now supports building a Dockerfile in the repo:

[docker:foo]
dockerfile = {toxinidir}/path/to/Dockerfile
dockerfile_target = target  # optional, used by multi-stage builds
# don't specify image=...

This should be more flexible than configuration through tox.ini, and will keep the tox configuration more focused