-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (18 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
23 lines (18 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.12.12-slim
# Install system dependencies and pipenv
RUN apt-get update && apt-get install -y --no-install-recommends \
libffi8 libssl3 ca-certificates ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir pipenv
# Set up working directory
WORKDIR /app
# Copy the contents over (respecting .dockerignore)
COPY . .
RUN mv .github/ISSUE_TEMPLATE src/templates && rm -rf .github
# Install the dependencies
RUN pipenv install --deploy --ignore-pipfile --verbose \
&& find /usr/local/lib/python3.12 -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true \
&& find /usr/local/lib/python3.12 -type f -name "*.pyc" -delete \
&& rm -rf /root/.cache/pip /root/.cache/pipenv
# Set the entrypoint command
CMD ["pipenv", "run", "python", "src/main.py"]