RFC: Add docker compose file for running non-native test environments #8331
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Would anyone else find it useful to be able to spin up the same containers that are used in CI? Is docker-compose a goood interface for doing so?
Opinions welcome!
I find it difficult to reproduce issues on old python versions, or when archlinux brings in a newer build of Qt than I have and I can't be bothered rebuilding.
I've been using docker for a while to help test in these environments locally, but the docker command is a bit long and unwieldy. Docker compose is a method I've used before to provide canned docker invocation. We could probably get away with writing our own script for it, but using standard components is good. This should work with podman-compose too.
This commit encodes the docker command I've been using so that I, and other people, can use it with a less arcane command line. Hopefully it helps other people. There are still a few rough edges like for any runs of the "other" service you will pretty much have to drop into a bash shell and install tox and some X11 stuff. But the images we publish work in one-liners (although they would be a little faster with a tox/pip cache directory mounted from the host so they don't setup the venv every time).
See also: the docker related hints in the contributor guidlines.