File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ # `python:3.11-slim` image is a lightweight, production-ready Python environment for running Python applications
2
+ # in a Docker container. The slim variant of the Python image is smaller than the stretch variant and is optimized for
3
+ # production use cases where a smaller image size is preferred.
4
+
5
+ # Using this image as the base allows you to build a containerized version of your Flask app with the necessary Python
6
+ # dependencies without having to install and manage those dependencies on the host machine instead of using the a OS and
7
+ # configuring it using a set of instructions in the Dockerfile see the
8
+ FROM python:3.11-slim
9
+
10
+ # Create app directory
11
+ WORKDIR /app
12
+
13
+ # Install app dependencies
14
+ # Make sure you have the `requirements.txt` file in the root directory of the project with the required dependencies.
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ COPY . .
19
+
20
+ # OPTIONAL as the `-p` flag is used while running the container
21
+ EXPOSE 5000
22
+
23
+ CMD ["python", "app.py"]
Original file line number Diff line number Diff line change
1
+ Flask
You can’t perform that action at this time.
0 commit comments