From b8994a227224bb5184954d7ea62089cbc52a16d5 Mon Sep 17 00:00:00 2001 From: cleaverm Date: Sat, 16 Apr 2022 06:47:05 +0200 Subject: [PATCH] Make Dockerfile.autobuild compatible with arm (#332) * Update Dockerfile.autobuild to use newer Python image * Update Dockerfile.autobuild to also work on arm --- Dockerfile.autobuild | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile.autobuild b/Dockerfile.autobuild index 51ec9b3..8b5f8fa 100644 --- a/Dockerfile.autobuild +++ b/Dockerfile.autobuild @@ -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