Skip to content

Commit 081a1a9

Browse files
hareeshnyaduclaude
andcommitted
Add Dockerfile for containerization with Podman/Docker
Enables building and running the Flask API in a container with all required dependencies including wkhtmltopdf for PDF generation support. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 9bad5c5 commit 081a1a9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.11-slim-bookworm
2+
3+
WORKDIR /app
4+
5+
RUN apt-get update && apt-get install -y wget xfonts-75dpi fontconfig libjpeg62-turbo libx11-6 libxcb1 libxext6 libxrender1 xfonts-base
6+
RUN apt-get update && apt-get install -y wkhtmltopdf
7+
COPY ./requirements.txt .
8+
RUN pip install --no-cache-dir -r requirements.txt
9+
10+
COPY ./ .
11+
12+
EXPOSE 5001
13+
14+
ENV FLASK_APP=app.py
15+
ENV FLASK_RUN_HOST=0.0.0.0
16+
ENV FLASK_RUN_PORT=5001
17+
CMD ["python3","-m","flask","run"]

0 commit comments

Comments
 (0)