Create Dockerfile
Browse files- Dockerfile +29 -0
Dockerfile
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install system dependencies (if any)
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
git \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Clone the Git repository
|
13 |
+
RUN git clone https://github.com/wasi-master/13ft.git /app
|
14 |
+
|
15 |
+
# Change to the directory containing the application code
|
16 |
+
WORKDIR /app
|
17 |
+
|
18 |
+
# Install dependencies from requirements.txt
|
19 |
+
RUN python -m pip install --upgrade pip
|
20 |
+
RUN python -m pip install -r requirements.txt
|
21 |
+
|
22 |
+
# Expose the port the app runs on
|
23 |
+
EXPOSE 9982
|
24 |
+
|
25 |
+
# Set environment variable for Flask
|
26 |
+
ENV FLASK_APP=app/portable.py
|
27 |
+
|
28 |
+
# Run the application on 127.0.0.1 and port 9982
|
29 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=9982"]
|