Commit 2d20fee3 authored by Noé Gaumont's avatar Noé Gaumont 🐙
Browse files

feat: drop python version selection and force python3

parent bf9c15adbfcd
......@@ -4,18 +4,17 @@ ENV LANG C.UTF-8
RUN mkdir -p /usr/share/man/man1 && mkdir -p /usr/share/man/man7
RUN apt-get update && apt-get -y dist-upgrade \
&& rm -rf /var/lib/apt/lists/*
ARG PYTHON
RUN apt-get update && apt-get -y --no-install-recommends install \
gettext \
uwsgi \
uwsgi-plugin-$PYTHON \
uwsgi-plugin-python3 \
graphviz \
postgresql-client \
$PYTHON-pip \
$PYTHON-setuptools \
python3-pip \
python3-setuptools \
pwgen \
&& rm -rf /var/lib/apt/lists/*
RUN test $PYTHON = "python" && export py=python2 pip=pip2 || export py=python3 pip=pip3; \
RUN export py=python3 pip=pip3; \
update-alternatives --install /usr/bin/python python /usr/bin/$py 50 && \
update-alternatives --install /usr/bin/pip pip /usr/bin/$pip 50 && \
pip install --upgrade pip
......@@ -27,7 +26,6 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK on
RUN useradd cubicweb --uid 1000 -m -s /bin/bash
RUN install -d -o cubicweb -g cubicweb /etc/cubicweb.d
COPY uwsgi.ini /etc/uwsgi/uwsgi.ini
RUN echo "plugins = http,$PYTHON" >> /etc/uwsgi/uwsgi.ini
COPY pyramid.ini.j2 /
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
......
......@@ -156,7 +156,6 @@ def build_image(image: CubicWebImage, onbuild: Optional[str], no_cache=False) ->
args["FROM"] = image.tag
tag = image.tag + "-onbuild"
else:
args["PYTHON"] = "python3"
dockerfile = "Dockerfile"
args["DIST"] = image.debian_dist
args["CUBICWEB_SOURCE"] = f"cubicweb[pyramid]=={image.cubicweb_version}"
......
......@@ -9,3 +9,4 @@ lazy-apps = true
log-master = true
disable-logging = true
http-timeout = 180
plugins = http,python3
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment