File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 3
3
FROM python:3.11 as base
4
4
5
5
# Set the working directory in the Docker image
6
- WORKDIR /usr/src/ app
6
+ WORKDIR /app
7
7
8
- # Copy the entire app directory into the container at /usr/src/ app
9
- COPY app/requirements/requirements.txt /usr/src/ app
8
+ # Copy the entire app directory into the container at /app
9
+ COPY app/requirements/requirements.txt /app
10
10
# use trailing . to include hidden files
11
- COPY app/. /usr/src/ app
11
+ COPY app/. /app
12
12
13
13
# Create and activate a virtual environment
14
- RUN python -m venv venv
14
+ RUN python3 -m venv venv
15
15
16
16
# Activate the virtual environment and install dependencies
17
- RUN . venv/bin/activate && pip install --no-cache-dir --upgrade -r requirements.txt
17
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
18
18
19
19
# Make port 8000 available to the world outside this container
20
20
EXPOSE 8000
@@ -29,4 +29,4 @@ HEALTHCHECK --interval=5m --timeout=3s \
29
29
CMD curl --fail http://localhost:8000/docs || exit 1
30
30
31
31
# Set entrypoint for FastAPI when the container launches
32
- ENTRYPOINT ["python" , "main.py" ]
32
+ CMD ["python" , "./ main.py" ]
You can’t perform that action at this time.
0 commit comments