1.7K
docker image for tox based off of ubuntu:18.04
To pull this image:
docker pull mbentley/tox
Example usage:
Make sure ${HOME}/.cache and ${HOME}/.local exist:
mkdir ${HOME}/.cache ${HOME}/.local
Run tox:
Note: Before running tox, make sure that you have bind mounts for all of the necessary files, such as your .gitconfig, .ssh, .cache files and directories; whatever you'll need in the container.
docker run -it --rm \
--name tox \
-e MY_USERNAME="${USER}" \
-e MY_UID="$(id -u)" \
-e MY_GID="$(id -g)" \
--tmpfs /tmp \
--tmpfs /var/log \
-v "${HOME}/.cache":/home/"${USER}/.cache" \
-v "${HOME}/.gitconfig":"/home/${USER}/.gitconfig":ro \
-v "${HOME}/.local":"/home/${USER}/.local" \
-v "${HOME}/.ssh":/home/"${USER}/.ssh":ro \
-v "${PWD}":/data \
-w /data \
mbentley/tox \
tox --help
Or if you do not want tox to store files in your home directory, you can use docker volumes:
docker run -it --rm \
--name tox \
-e MY_USERNAME="${USER}" \
-e MY_UID="$(id -u)" \
-e MY_GID="$(id -g)" \
--tmpfs /tmp \
--tmpfs /var/log \
-v tox-cache:/home/"${USER}/.cache" \
-v tox-local:"/home/${USER}/.local" \
-v "${HOME}/.gitconfig":"/home/${USER}/.gitconfig":ro \
-v "${HOME}/.ssh":/home/"${USER}/.ssh":ro \
-v "${PWD}":/data \
-w /data \
mbentley/tox \
tox --help
If you wish to run tox and have it appear to run as if it is natively installed and work by just calling tox, create a bash function and add it to your ~/.bashrc:
tox() {
docker run -it --rm \
--name "tox-$(date +%s)" \
-e MY_USERNAME="${USER}" \
-e MY_UID="$(id -u)" \
-e MY_GID="$(id -g)" \
--tmpfs /tmp \
--tmpfs /var/log \
-v tox-cache:/home/"${USER}/.cache" \
-v tox-local:"/home/${USER}/.local" \
-v "${HOME}/.gitconfig":"/home/${USER}/.gitconfig":ro \
-v "${HOME}/.ssh":/home/"${USER}/.ssh":ro \
-v "${PWD}":/data \
-w /data \
mbentley/tox \
tox ${@}
}
Content type
Image
Digest
Size
213.2 MB
Last updated
about 6 years ago
docker pull mirantis/toxPulls:
131
Last week