Dockerfile: switch to ubuntu:jammy for >python3.8

ubuntu:jammy provides python 3.10.6 which supports current bitbake.
Dropped unneeded python2 packages.
Moved locale generation high to reduce error messages during image building.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
This commit is contained in:
Michael Halstead 2022-12-16 08:42:54 -08:00 committed by Tim Orling
parent 61c857a7df
commit 13c94088b4

View File

@ -1,6 +1,6 @@
# See README for how to use this. # See README for how to use this.
FROM debian:buster FROM ubuntu:jammy
LABEL maintainer="Michael Halstead <mhalstead@linuxfoundation.org>" LABEL maintainer="Michael Halstead <mhalstead@linuxfoundation.org>"
ENV PYTHONUNBUFFERED=1 \ ENV PYTHONUNBUFFERED=1 \
@ -17,30 +17,29 @@ ENV PYTHONUNBUFFERED=1 \
COPY requirements.txt / COPY requirements.txt /
RUN DEBIAN_FRONTEND=noninteractive apt-get update \ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& update-locale \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
autoconf \ autoconf \
g++ \ g++ \
gcc \ gcc \
make \ make \
python-pip \ python2 \
python-mysqldb \
python-dev \
python-pil \
python-wheel \
python3-pip \ python3-pip \
python3-mysqldb \ python3-mysqldb \
python3-dev \ python3-dev \
python3-pil \ python3-pil \
python3-wheel \ python3-wheel \
libz-dev \ zlib1g-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
libmariadbclient-dev \ libmariadb-dev-compat \
locales \
netcat-openbsd \ netcat-openbsd \
curl \ curl \
wget \ wget \
git-core \ git \
vim \ vim \
rpm2cpio \ rpm2cpio \
rpm \ rpm \
@ -51,7 +50,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& pip3 install gunicorn \ && pip3 install gunicorn \
&& pip3 install setuptools \ && pip3 install setuptools \
&& pip3 install -r /requirements.txt \ && pip3 install -r /requirements.txt \
&& apt-get purge -y autoconf g++ make python3-dev libjpeg-dev libmariadbclient-dev \ && apt-get purge -y autoconf g++ make python3-dev libjpeg-dev \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& apt-get clean && apt-get clean