Azeez98 commited on
Commit
35bccbf
·
verified ·
1 Parent(s): 5241c6d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a base image with the necessary tools
2
+ FROM ubuntu:20.04
3
+
4
+ # Set environment variables to non-interactive mode
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install necessary packages
8
+ RUN apt-get update && \
9
+ apt-get install -y \
10
+ skopeo \
11
+ python3 \
12
+ python3-pip \
13
+ && apt-get clean \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Install FastAPI and Uvicorn
17
+ RUN pip3 install fastapi uvicorn
18
+
19
+ # Copy the FastAPI app into the image
20
+ COPY main.py /app/main.py
21
+
22
+ # Set the working directory
23
+ WORKDIR /app
24
+
25
+ # Expose the port the app runs on
26
+ EXPOSE 5000
27
+
28
+ # Run the FastAPI app with Uvicorn
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]