Make Dockerfile.autobuild compatible with arm (#332)

* Update Dockerfile.autobuild to use newer Python image

* Update Dockerfile.autobuild to also work on arm
This commit is contained in:
cleaverm
2022-04-16 06:47:05 +02:00
committed by GitHub
parent 72f19dfc82
commit b8994a2272

View File

@@ -21,7 +21,7 @@ RUN yarn build
# Required for other database options
FROM python:3.7-slim-buster as base
FROM python:3.9.12-slim-buster as base
RUN apt-get update \
&& apt-get -y install gcc default-libmysqlclient-dev
@@ -29,7 +29,7 @@ RUN pip --no-cache-dir install --user mysqlclient cx-Oracle
# Final image
FROM python:3.7-slim-buster
FROM python:3.9.12-slim-buster
WORKDIR pinry
RUN mkdir /data && chown -R www-data:www-data /data
@@ -42,11 +42,13 @@ RUN groupadd -g 2300 tmpgroup \
&& usermod -u 1000 www-data \
&& groupdel tmpgroup
# Install nginx
RUN apt-get update \
# Install nginx
&& apt-get -y install nginx pwgen \
# Install Pillow dependencies
&& apt-get -y install libopenjp2-7 libjpeg-turbo-progs libjpeg62-turbo-dev libtiff5-dev libxcb1 \
# Needed to compile psycopg2 on arm (fallback for psycopg2-binary)
&& if [ $(dpkg --print-architecture) = "arm64" -o $(dpkg --print-architecture) = "armhf" ]; then apt-get -y install libpq-dev gcc; fi \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoclean