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 ...@@ -4,18 +4,17 @@ ENV LANG C.UTF-8
RUN mkdir -p /usr/share/man/man1 && mkdir -p /usr/share/man/man7 RUN mkdir -p /usr/share/man/man1 && mkdir -p /usr/share/man/man7
RUN apt-get update && apt-get -y dist-upgrade \ RUN apt-get update && apt-get -y dist-upgrade \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ARG PYTHON
RUN apt-get update && apt-get -y --no-install-recommends install \ RUN apt-get update && apt-get -y --no-install-recommends install \
gettext \ gettext \
uwsgi \ uwsgi \
uwsgi-plugin-$PYTHON \ uwsgi-plugin-python3 \
graphviz \ graphviz \
postgresql-client \ postgresql-client \
$PYTHON-pip \ python3-pip \
$PYTHON-setuptools \ python3-setuptools \
pwgen \ pwgen \
&& rm -rf /var/lib/apt/lists/* && 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/python python /usr/bin/$py 50 && \
update-alternatives --install /usr/bin/pip pip /usr/bin/$pip 50 && \ update-alternatives --install /usr/bin/pip pip /usr/bin/$pip 50 && \
pip install --upgrade pip pip install --upgrade pip
...@@ -27,7 +26,6 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK on ...@@ -27,7 +26,6 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK on
RUN useradd cubicweb --uid 1000 -m -s /bin/bash RUN useradd cubicweb --uid 1000 -m -s /bin/bash
RUN install -d -o cubicweb -g cubicweb /etc/cubicweb.d RUN install -d -o cubicweb -g cubicweb /etc/cubicweb.d
COPY uwsgi.ini /etc/uwsgi/uwsgi.ini COPY uwsgi.ini /etc/uwsgi/uwsgi.ini
RUN echo "plugins = http,$PYTHON" >> /etc/uwsgi/uwsgi.ini
COPY pyramid.ini.j2 / COPY pyramid.ini.j2 /
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
......
...@@ -156,7 +156,6 @@ def build_image(image: CubicWebImage, onbuild: Optional[str], no_cache=False) -> ...@@ -156,7 +156,6 @@ def build_image(image: CubicWebImage, onbuild: Optional[str], no_cache=False) ->
args["FROM"] = image.tag args["FROM"] = image.tag
tag = image.tag + "-onbuild" tag = image.tag + "-onbuild"
else: else:
args["PYTHON"] = "python3"
dockerfile = "Dockerfile" dockerfile = "Dockerfile"
args["DIST"] = image.debian_dist args["DIST"] = image.debian_dist
args["CUBICWEB_SOURCE"] = f"cubicweb[pyramid]=={image.cubicweb_version}" args["CUBICWEB_SOURCE"] = f"cubicweb[pyramid]=={image.cubicweb_version}"
......
...@@ -9,3 +9,4 @@ lazy-apps = true ...@@ -9,3 +9,4 @@ lazy-apps = true
log-master = true log-master = true
disable-logging = true disable-logging = true
http-timeout = 180 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