sudo-soldier commited on
Commit
a937dd1
·
verified ·
1 Parent(s): 11efac1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -8
Dockerfile CHANGED
@@ -1,20 +1,47 @@
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
- # Copy the current directory contents into the container at /app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  COPY . /app
9
 
10
- # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Make port 8000 available to the world outside the container
14
  EXPOSE 8000
15
 
16
- # Run the FastAPI application with uvicorn
17
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
18
-
19
 
20
 
 
1
+ # Use an official Python image from Docker Hub
2
  FROM python:3.9-slim
3
 
4
+ # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
+ RUN apt-get update && \
9
+ apt-get install -y \
10
+ git \
11
+ unzip \
12
+ curl \
13
+ xz-utils \
14
+ libssl-dev \
15
+ libreadline-dev \
16
+ libyaml-dev \
17
+ libsqlite3-dev \
18
+ sqlite3 \
19
+ libbz2-dev \
20
+ libgdbm-dev \
21
+ libncurses5-dev \
22
+ libncursesw5-dev \
23
+ libffi-dev \
24
+ liblzma-dev \
25
+ libmagic-dev \
26
+ make \
27
+ clang \
28
+ cmake \
29
+ xcode-select \
30
+ && rm -rf /var/lib/apt/lists/*
31
+
32
+ # Install Fastlane
33
+ RUN curl -sL https://dl.bintray.com/fastlane/fastlane/install | bash
34
+
35
+ # Copy the FastAPI app files to the container
36
  COPY . /app
37
 
38
+ # Install FastAPI and Uvicorn
39
  RUN pip install --no-cache-dir -r requirements.txt
40
 
41
+ # Expose the port the app will run on
42
  EXPOSE 8000
43
 
44
+ # Start the FastAPI app
45
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
46
 
47