]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docker: Rebase onto custom image
authorYou-Sheng Yang <vicamo@gmail.com>
Sun, 12 Dec 2021 06:17:40 +0000 (14:17 +0800)
committerStephen Finucane <stephen@that.guru>
Tue, 22 Feb 2022 14:51:51 +0000 (14:51 +0000)
Rebuild pyenv environments can be time-consuming and irrelevant to this
project. Use a prebuild image to save some time here.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
[stephenfin: Modified to use our own vendored image]

tools/docker/Dockerfile

index fe0cd59b5e2768334dc4906fe02ff6b6be7fc05d..3653d4e77df2c30fedc4b3e5d162aec6da5d1e31 100644 (file)
@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM ghcr.io/getpatchwork/pyenv:latest
 
 ARG UID
 ARG GID
@@ -10,11 +10,6 @@ RUN echo $UID; echo $GID; \
     [ -n "$GID" ] || { echo "You must define GID in .env" 1>&2; exit 1; }
 
 ARG TZ="Australia/Canberra"
-ENV LANG="C.UTF-8"
-ENV LC_ALL="C.UTF-8"
-ENV PATH="/opt/pyenv/shims:/opt/pyenv/bin:$PATH"
-ENV PYENV_ROOT="/opt/pyenv"
-ENV PYENV_SHELL="bash"
 ENV DEBIAN_FRONTEND noninteractive
 ENV PYTHONUNBUFFERED 1
 ENV PROJECT_HOME /home/patchwork/patchwork
@@ -26,33 +21,15 @@ RUN rm -f /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime
 
 RUN apt-get update && apt-get install -y --no-install-recommends \
     build-essential \
-    ca-certificates \
-    curl \
-    git \
-    libbz2-dev \
-    libffi-dev \
     libmysqlclient-dev \
     libpq-dev \
-    libreadline-dev \
     libsqlite3-dev \
-    libssl-dev \
     mysql-client \
     postgresql-client \
     tzdata \
-    zlib1g-dev \
     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
-RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash && \
-    git clone https://github.com/momo-lab/xxenv-latest $PYENV_ROOT/plugins/xxenv-latest && \
-    pyenv update
-
-RUN pyenv latest install 3.6 && \
-    pyenv latest install 3.7 && \
-    pyenv latest install 3.8 && \
-    pyenv latest install 3.9
-RUN pyenv global $(pyenv versions --bare | tac)
-
-RUN pip install tox tox-pyenv
+RUN pip install wheel tox tox-pyenv
 
 # we deliberately leave the requirements files in /opt so we can ping the user
 # in entrypoint.sh if they change