Skip to content

Commit 4d8c91f

Browse files
author
codewitching
committed
install pytest in docker image for ci testing
1 parent de8a636 commit 4d8c91f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
# Step 1: Use official Python image
21
FROM python:3.12-slim
32

4-
# Step 2: Set working directory inside container
53
WORKDIR /app
64

7-
# Step 3: Copy all project files into the container
85
COPY . .
96

10-
# Step 4: Install Python dependencies
11-
RUN pip install --no-cache-dir -r requirements.txt
7+
RUN pip install --no-cache-dir -r requirements.txt \
8+
&& pip install pytest
129

13-
# Step 5: Expose port Flask will run on
14-
EXPOSE 5000
10+
ENV PYTHONPATH=/app
1511

16-
# Step 6: Run the Flask app
17-
CMD ["python", "app.py"]
12+
CMD ["python", "app.py"]

0 commit comments

Comments
 (0)