-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 921 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 921 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
30
31
32
33
34
35
36
37
# Set Python UV image
FROM ghcr.io/astral-sh/uv:python3.14-trixie-slim
# Copy the uv binary from the official image
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
## Create the app directory
#RUN useradd -m -r appuser
#RUN mkdir /app
#RUN chown -R appuser /app
## Set the work directory inside the container
WORKDIR /app
## Set environment to optimize Python
## Prevents Python from writing pyc files to the disk
ENV PYTHONDONTWRITEBYTECODE=1
## Prevents Python from buffering stdout and stderr
ENV PYTHONUNBUFFERED=1
## Upgrade pip
# RUN pip install --upgrade pip
## Copy the Django project and install dependencies
#COPY requirements /app/
## Run this command to install all dependencies
#RUN pip install -r --no-cache-dir requirements/dev.txt
## Copy the Django project to the container
#COPY --chown=appuser:appuser . .
## Switch to non-user root
#USER appuser
## Expose the Django port
EXPOSE 8000