-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (25 loc) · 927 Bytes
/
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
FROM python:3.12-slim-bookworm
ARG ENVIRONMENT
ENV PYTHONUNBUFFERED 1
ENV UV_HTTP_TIMEOUT 300
ENV GOOGLE_APPLICATION_CREDENTIALS /google-application-credential.json
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get update && apt-get install -y \
curl gdal-bin git gcc jq python3-dev
ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
RUN /install.sh && rm /install.sh
RUN mkdir /code
WORKDIR /code
COPY requirements.lock ./
COPY requirements-dev.lock ./
RUN --mount=type=cache,target=/root/.cache/uv if [ "$ENVIRONMENT" = "dev" ]; \
then \
/root/.cargo/bin/uv \
pip install --system --no-cache -r requirements-dev.lock \
; else \
/root/.cargo/bin/uv \
pip install --system --no-cache -r requirements.lock \
; fi
COPY . /code/