Chris4K commited on
Commit
80b3b60
·
verified ·
1 Parent(s): 8eb63bd

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ docker.io \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Set the working directory in the container
10
+ WORKDIR /app
11
+
12
+ # Copy the current directory contents into the container at /app
13
+ COPY . /app
14
+
15
+ # Install any needed packages specified in requirements.txt
16
+ RUN pip install --no-cache-dir \
17
+ docker \
18
+ requests
19
+
20
+ # Make port 3000 available to the world outside this container
21
+ EXPOSE 3000
22
+
23
+ # Define environment variable to ensure Python outputs are sent to terminal
24
+ ENV PYTHONUNBUFFERED=1
25
+
26
+ # Run app.py when the container launches
27
+ CMD ["python", "app.py"]