forked from unfoldingWord/fred-zulip-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 684 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 684 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
# Use Chainguard Wolfi base image
FROM cgr.dev/chainguard/wolfi-base
# Set Python version
ARG version=3.13
# Set working directory
WORKDIR /app
# Install Python and pip
RUN apk update && apk add --no-cache \
python-${version} \
py${version}-pip \
py${version}-setuptools \
git
# Copy application code
COPY . .
# Change ownership of app directory to nonroot user
RUN chown -R nonroot:nonroot /app/
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Switch to non-root user
USER nonroot
# Expose FastAPI port
EXPOSE 8000
# Use entrypoint script to start the app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]