Skip to content

Commit 50e88ba

Browse files
authored
Merge pull request #22 from alexandrainst/improved-docker
Improve Dockerfile
2 parents cc0a077 + 7011640 commit 50e88ba

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
FROM python:{{ cookiecutter.python_version }}-slim-bookworm
22

3-
# Install uv
4-
RUN sudo apt-get update && sudo apt-get install -y curl && \
3+
# Install uv (note: the script itself also requires curl)
4+
RUN apt-get update && apt-get install -y curl && \
55
curl -LsSf https://astral.sh/uv/install.sh | sh && \
6-
source $HOME/.cargo/env
6+
apt-get clean && rm -rf /var/lib/apt/lists/*
7+
8+
ENV PATH="/root/.local/bin:/project/.venv/bin/:${PATH}"
79

8-
# Move the files into the container
910
WORKDIR /project
10-
COPY . /project
1111

1212
# Install dependencies
13+
COPY pyproject.toml uv.lock ./
1314
RUN uv sync --no-dev --no-cache
1415

16+
# Copy the project files into the container
17+
COPY . .
18+
1519
# Run the script
1620
CMD uv run python src/scripts/main.py

0 commit comments

Comments
 (0)