diff contrib/docker/pytype/Dockerfile @ 6649:da3fd8644ad9

contrib: add a Dockerfile to run pytype using our CI setup locally
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 05 Jan 2024 13:58:25 -0300
parents
children 9c329a7a5922
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/docker/pytype/Dockerfile	Fri Jan 05 13:58:25 2024 -0300
@@ -0,0 +1,14 @@
+FROM registry.heptapod.net/mercurial/ci-images/py3-hgext3rd:v2.0
+
+USER ci-runner
+
+ENV PATH=/home/ci-runner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ENV PYTHONPATH=/home/ci-runner/.local/lib/python3.11/site-packages
+
+RUN python3 -m pip install --user --break-system-packages --upgrade pytype==2023.11.21
+
+ADD --chown=ci-runner entrypoint.sh /home/ci-runner/entrypoint.sh
+
+RUN chmod -R a=rwX /home/ci-runner/.local/ /home/ci-runner/entrypoint.sh
+
+CMD /home/ci-runner/entrypoint.sh