Skip to content
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

Add tox #14328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add tox #14328

wants to merge 1 commit into from

Conversation

31z4
Copy link
Contributor

@31z4 31z4 commented Mar 24, 2023

tox is a generic Python virtual environment management and test command line tool.

Relevant discussions with tox maintainers and community:

Documentation PR: docker-library/docs#2307

Checklist for Review

NOTE: This checklist is intended for the use of the Official Images maintainers both to track the status of your PR and to help inform you and others of where we're at. As such, please leave the "checking" of items to the repository maintainers. If there is a point below for which you would like to provide additional information or note completion, please do so by commenting on the PR. Thanks! (and thanks for staying patient with us ❤️)

  • associated with or contacted upstream?
  • available under an OSI-approved license?
  • does it fit into one of the common categories? ("service", "language stack", "base distribution")
  • is it reasonably popular, or does it solve a particular use case well?
  • does a documentation PR exist? (should be reviewed and merged at roughly the same time so that we don't have an empty image page on the Hub for very long)
  • official-images maintainer dockerization review for best practices and cache gotchas/improvements (ala the official review guidelines)?
  • 2+ official-images maintainer dockerization review?
  • existing official images have been considered as a base? (ie, if foobar needs Node.js, has FROM node:... instead of grabbing node via other means been considered?)
  • if FROM scratch, tarballs only exist in a single commit within the associated history?
  • passes current tests? any simple new tests that might be appropriate to add? (https://github.com/docker-library/official-images/tree/master/test)

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

Diff for 2023590:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..1b79d93 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,4 @@
-
+amd64
+arm64v8
+ppc64le
+s390x
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..c83dedf 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,7 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Elisey Zanko <elisey.zanko@gmail.com> (@31z4)
+Architectures: amd64, arm64v8, ppc64le, s390x
+GitRepo: https://github.com/31z4/tox-docker.git
+GitFetch: refs/heads/main
+
+Tags: 4-3, 4-3.0, 4-3.0.1, 4, 4.4-3, 4.4-3.0, 4.4-3.0.1, 4.4, 4.4.7-3, 4.4.7-3.0, 4.4.7-3.0.1, 4.4.7, latest
+GitCommit: 881e2f195d431ca14d1da7e2e5044c3e0ff932b7
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..957744d 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,13 @@
+tox:4
+tox:4-3
+tox:4-3.0
+tox:4-3.0.1
+tox:4.4
+tox:4.4-3
+tox:4.4-3.0
+tox:4.4-3.0.1
+tox:4.4.7
+tox:4.4.7-3
+tox:4.4.7-3.0
+tox:4.4.7-3.0.1
+tox:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..df3244b 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1 @@
+tox:latest
diff --git a/tox_latest/.dockerignore b/tox_latest/.dockerignore
new file mode 100644
index 0000000..117fd87
--- /dev/null
+++ b/tox_latest/.dockerignore
@@ -0,0 +1,9 @@
+tests
+venv
+.dockerignore
+.gitignore
+.python-version
+Dockerfile
+Makefile
+README.md
+requirements.in
\ No newline at end of file
diff --git a/tox_latest/Dockerfile b/tox_latest/Dockerfile
new file mode 100644
index 0000000..bb7671a
--- /dev/null
+++ b/tox_latest/Dockerfile
@@ -0,0 +1,80 @@
+FROM ubuntu:22.04
+
+ARG GPG_KEY=F23C5A6CF475977595C89F51BA6932366A755776
+
+# Install common build dependencies, add deadsnakes PPA and cleanup.
+RUN set -eux; \
+    apt-get update; \
+    apt-get install -y --no-install-recommends \
+        ca-certificates \
+        g++ \
+        gcc \
+        git \
+        make; \
+    \
+    savedAptMark="$(apt-mark showmanual)"; \
+    apt-get install -y --no-install-recommends \
+        dirmngr \
+        gnupg; \
+    \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys "$GPG_KEY"; \
+    gpg -o /usr/share/keyrings/deadsnakes.gpg --export "$GPG_KEY"; \
+    echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/deadsnakes.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list; \
+    \
+    apt-mark auto '.*' > /dev/null; \
+    apt-mark manual $savedAptMark; \
+    apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+    rm -rf /var/lib/apt/lists/*
+
+# Install Python and pip and cleanup.
+RUN set -eux; \
+    apt-get update; \
+    DEBIAN_FRONTEND=noninteractive \
+    apt-get install -y --no-install-recommends \
+        python3.7 \
+        python3.8 \
+        python3.9 \
+        python3.10 \
+        python3.11 \
+        \
+        python3.7-dev \
+        python3.8-dev \
+        python3.9-dev \
+        python3.10-dev \
+        python3.11-dev \
+        \
+        python3.7-venv \
+        python3.8-venv \
+        python3.9-venv \
+        python3.10-venv \
+        python3.11-venv \
+        \
+        python3.7-distutils \
+        python3.8-distutils \
+        python3.9-distutils \
+        python3.10-distutils \
+        python3.11-distutils \
+        \
+        python3-pip; \
+    rm -rf /var/lib/apt/lists/*; \
+    \
+    python3.11 -m pip install --upgrade pip
+
+# Install tox and add a user with an explicit UID/GID.
+COPY requirements.txt /
+RUN set -eux; \
+    pip3.11 install --no-deps -r /requirements.txt; \
+    groupadd -r tox --gid=10000; \
+    useradd --no-log-init -r -g tox -m --uid=10000 tox; \
+    mkdir /tests; \
+    chown tox:tox /tests
+
+WORKDIR /tests
+VOLUME /tests
+
+COPY docker-entrypoint.sh /usr/local/bin/
+
+ENTRYPOINT ["docker-entrypoint.sh"]
+USER tox
+CMD ["tox"]
\ No newline at end of file
diff --git a/tox_latest/docker-entrypoint.sh b/tox_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..ce4feef
--- /dev/null
+++ b/tox_latest/docker-entrypoint.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+isLikelyTox=
+case "$1" in
+	run | r | run-parallel | p | depends | de | list | l | devenv | d | config | c | quickstart | q | exec | e | legacy | le ) isLikelyTox=1 ;;
+esac
+
+# First arg is `-v` or `--some-option`.
+# Or if our command is a valid tox subcommand, let's invoke it through tox instead.
+# This allows for "docker run 31z4/tox run-parallel", etc.
+if [ "${1#-}" != "$1" ] || [ -n "$isLikelyTox" ]; then
+	set -- tox "$@"
+fi
+
+exec "$@"
\ No newline at end of file
diff --git a/tox_latest/requirements.txt b/tox_latest/requirements.txt
new file mode 100644
index 0000000..b880f6c
--- /dev/null
+++ b/tox_latest/requirements.txt
@@ -0,0 +1,56 @@
+#
+# This file is autogenerated by pip-compile with Python 3.11
+# by the following command:
+#
+#    pip-compile --generate-hashes requirements.in
+#
+cachetools==5.3.0 \
+    --hash=sha256:13dfddc7b8df938c21a940dfa6557ce6e94a2f1cdfa58eb90c805721d58f2c14 \
+    --hash=sha256:429e1a1e845c008ea6c85aa35d4b98b65d6a9763eeef3e37e92728a12d1de9d4
+    # via tox
+chardet==5.1.0 \
+    --hash=sha256:0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5 \
+    --hash=sha256:362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9
+    # via tox
+colorama==0.4.6 \
+    --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
+    --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
+    # via tox
+distlib==0.3.6 \
+    --hash=sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46 \
+    --hash=sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e
+    # via virtualenv
+filelock==3.9.0 \
+    --hash=sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de \
+    --hash=sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d
+    # via
+    #   tox
+    #   virtualenv
+packaging==23.0 \
+    --hash=sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2 \
+    --hash=sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97
+    # via
+    #   pyproject-api
+    #   tox
+platformdirs==2.6.2 \
+    --hash=sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490 \
+    --hash=sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2
+    # via
+    #   tox
+    #   virtualenv
+pluggy==1.0.0 \
+    --hash=sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159 \
+    --hash=sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3
+    # via tox
+pyproject-api==1.5.0 \
+    --hash=sha256:0962df21f3e633b8ddb9567c011e6c1b3dcdfc31b7860c0ede7e24c5a1200fbe \
+    --hash=sha256:4c111277dfb96bcd562c6245428f27250b794bfe3e210b8714c4f893952f2c17
+    # via tox
+tox==4.4.7 \
+    --hash=sha256:52c92a96e2c3fd47c5301e9c26f5a871466133d5376958c1ed95ef4ff4629cbe \
+    --hash=sha256:da10ca1d809b99fae80b706b9dc9656b1daf505a395ac427d130a8a85502d08f
+    # via -r requirements.in
+virtualenv==20.17.1 \
+    --hash=sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4 \
+    --hash=sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058
+    # via tox

@31z4 31z4 marked this pull request as ready for review March 24, 2023 11:56
@31z4
Copy link
Contributor Author

31z4 commented Mar 31, 2023

Hi @tianon @yosifkit. I hope you guys will find some time to have a look at this PR. Let me know if you have any questions or concerns. Thanks! ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant