From 507f921e02c7de2b504c820e8553ca117d467a61 Mon Sep 17 00:00:00 2001 From: Massimiliano Moraca Date: Fri, 9 Feb 2024 19:11:05 +0100 Subject: [PATCH] minor fixes --- Dockerfile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa96764..2ff6bc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,21 @@ # Official Ubuntu Image as Layer FROM ubuntu:22.04 as os + # LABEL about the custom image LABEL maintainer="Massimiliano Moraca " + +# Set work directory WORKDIR /app + # Disable Prompt During Packages Installation ARG DEBIAN_FRONTEND=noninteractive + # Update&Upgrade Ubuntu RUN apt update -y && apt upgrade -y && apt -y autoremove + # Install useful packages -RUN apt install -y \ +RUN apt install -y --no-install-recommends \ nano \ unzip \ wget \ @@ -18,16 +24,19 @@ RUN apt install -y \ aptitude # Manage tzdata -RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC +ENV TZ=Etc/UTC RUN aptitude install -y tzdata # OS as Layer FROM os as python-os + # Set Python environment variables # Prevents Python from writing pyc files to disc ENV PYTHONDONTWRITEBYTECODE 1 + # Prevents Python from buffering stdout and stderr ENV PYTHONUNBUFFERED 1 + # Install python and upgrade pip RUN aptitude install -y \ python3-pip \ @@ -37,13 +46,16 @@ RUN aptitude install -y \ libssl-dev \ libffi-dev \ binutils + RUN pip3 install --upgrade pip + # Upgrade Python's packages RUN pip3 install --upgrade wheel pillow setuptools RUN pip3 install poetry # Python OS as Layer FROM python-os as gis-os + # Installing Geospatial libraries RUN aptitude install -y \ libpq-dev \ @@ -51,11 +63,11 @@ RUN aptitude install -y \ libproj-dev proj-data proj-bin \ # Install GEOS libgeos-dev + # Install GDAL RUN aptitude install -y \ libgdal-dev \ python3-gdal \ gdal-bin - # CMD ["gdalinfo", "--version"] \ No newline at end of file