Update Dockerfile
Browse files- Dockerfile +12 -15
Dockerfile
CHANGED
@@ -1,23 +1,20 @@
|
|
1 |
-
# Use
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
-
#
|
8 |
-
|
|
|
|
|
|
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
-
# RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
-
# Make
|
15 |
-
|
16 |
-
EXPOSE 80
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
-
# ENV NAME Value
|
21 |
-
|
22 |
-
# Run app.py when the container launches
|
23 |
-
CMD ["python", "main.py"]
|
|
|
1 |
+
# Use the official Python image as the base image
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /usr/src/app
|
6 |
|
7 |
+
# Install system dependencies
|
8 |
+
# curl is required to download the install script
|
9 |
+
RUN apt-get update && apt-get install -y \
|
10 |
+
curl \
|
11 |
+
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
+
# Copy the Python script into the container
|
14 |
+
COPY script.py .
|
|
|
15 |
|
16 |
+
# Make the Python script executable
|
17 |
+
RUN chmod +x script.py
|
|
|
18 |
|
19 |
+
# Run the Python script when the container launches
|
20 |
+
CMD ["python", "./script.py"]
|
|
|
|
|
|
|
|