forked from PhillyBikeAction/bikeaction.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
29 lines (27 loc) · 983 Bytes
/
Dockerfile.dev
File metadata and controls
29 lines (27 loc) · 983 Bytes
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
FROM python:3.11-bullseye
RUN set -eux; \
rm -f /etc/apt/apt.conf.d/docker-clean; \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache;
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update \
&& apt-get install -y gettext binutils libproj-dev gdal-bin
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ARG USER_ID
ARG GROUP_ID
RUN groupadd -o -g $GROUP_ID -r usergrp
RUN useradd -o -m -u $USER_ID -g $GROUP_ID user
RUN mkdir /code
RUN chown user /code
ENV PATH="${PATH}:/home/user/.local/bin"
USER user
WORKDIR /code
COPY requirements /code/requirements
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements/base.txt
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements/dev.txt
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements/deploy.txt
COPY . /code/