-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
33 lines (28 loc) · 1.1 KB
/
Dockerfile.dev
File metadata and controls
33 lines (28 loc) · 1.1 KB
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
# syntax = docker/dockerfile:1.5
FROM python:3.11-bookworm
ENV PYTHONUNBUFFERED=1
# install node/npm
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 && \
echo "deb https://deb.nodesource.com/node_20.x bookworm main" > /etc/apt/sources.list.d/nodesource.list && \
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
apt-get update && \
apt-get install -yqq nodejs \
# install gettext for translations
gettext
# create code directory
RUN mkdir /code
WORKDIR /code
# install uv
COPY --from=ghcr.io/astral-sh/uv:0.5.2 /uv /uvx /bin/
# install python requirements
# copy just dependency file(s) and install before rest of code to avoid having to
# reinstall packages during build every time code changes
COPY requirements.txt requirements.txt
COPY dev-requirements.txt dev-requirements.txt
COPY requirements requirements/
RUN --mount=type=cache,target=/root/.cache \
uv pip install --system -r dev-requirements.txt
# copy code files
COPY . /code/