-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
36 lines (25 loc) · 1.25 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
FROM python:3.13.1-slim-bookworm
RUN adduser --disabled-password terraso
ENV PATH=/home/terraso/.local/bin:$PATH
# see https://github.com/aws/aws-cli/tags for list of versions
ENV AWS_CLI_VERSION=2.8.12
# Add testing sources and pin the GDAL packages to testing
# Allows us to get 3.9.x versions of GDAL
RUN sed 's/bookworm/testing/g' /etc/apt/sources.list.d/debian.sources > /etc/apt/sources.list.d/testing.sources
RUN echo 'Package: libgdal-dev gdal-bin\nPin: release a=testing\nPin-Priority: 900' > /etc/apt/preferences.d/gdal-testing
RUN apt-get update && \
apt-get install -q -y --no-install-recommends \
build-essential libpq-dev dnsutils libmagic-dev mailcap \
gettext software-properties-common \
libkml-dev libgdal-dev gdal-bin unzip curl && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --chown=terraso:terraso requirements.txt /app
COPY --chown=terraso:terraso Makefile /app
USER terraso
RUN pip install --upgrade pip && make install
COPY --chown=terraso:terraso . /app
RUN django-admin compilemessages --locale=es --locale=en