-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
73 lines (56 loc) · 1.42 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# syntax=docker/dockerfile:1
# Official Ubuntu Image as Layer
FROM ubuntu:22.04 AS os
# LABEL about the custom image
LABEL maintainer="Massimiliano Moraca <info@massimilianomoraca.it>"
# 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 --no-install-recommends \
nano \
unzip \
wget \
curl \
aptitude
# Manage tzdata
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 \
python3-venv \
python3-dev \
build-essential \
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 \
# Install PROJ
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"]