Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/acerv/tox-docker

A Dockerfile to run tox with multiple python versions.
https://github.com/acerv/tox-docker

docker python python23 python24 python25 python26 python27 python31 python32 python33 python34 python35 python36 python37 python38 python39 testing testing-tools tox

Last synced: about 1 month ago
JSON representation

A Dockerfile to run tox with multiple python versions.

Awesome Lists containing this project

README

        

# Introduction

Docker image to run tox with multiple python versions. Available images
are the following:

* **sawkita/tox:2** - python2 only
* **sawkita/tox:3** - python3 only
* **sawkita/tox:all** - both python 2 and 3

This is an image based on **ubuntu-18.04** with a pre-installed version of **tox**.
By using the ``TOX_VERSION`` environment variable, it's possible to select the tool version.

Check below for supported python versions.

# Running tox

An example command to use ``sawkita/tox`` image is the following:

# pull all python versions
docker pull sawkita/tox:all

# pull python2 only image
docker pull sawkita/tox:2

# pull python3 only image
docker pull sawkita/tox:3

# run a container
docker container run \
--mount src=$PWD,target=/src,type=bind \ # mount python source code in /src
--interactive \ # use interactive mode
--tty \ # use pseudo-terminal
--rm \ # remove the container after testing
sawkita/tox:all \ # 2 or 3 can be used
/bin/bash -c "cd /src && tox" # run tox inside /src

# Python versions

Supported python versions are the following:

* python2.3
* python2.4
* python2.5
* python2.6
* python2.7
* python3.1
* python3.2
* python3.3
* python3.4
* python3.5
* python3.6
* python3.7
* python3.8
* python3.9