fengmiguoji commited on
Commit
cb329ef
·
verified ·
1 Parent(s): 2b65420

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Ubuntu base image
2
+ FROM ubuntu:jammy
3
+ LABEL maintainer="Evil0ctal"
4
+
5
+ # Set non-interactive frontend (useful for Docker builds)
6
+ ENV DEBIAN_FRONTEND=noninteractive
7
+
8
+ # Update the package list and install Python and pip
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ python3.11 \
11
+ python3-pip \
12
+ python3.11-dev \
13
+ && apt-get clean \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Set a working directory
17
+ WORKDIR /app
18
+
19
+ # Copy the application source code to the container
20
+ COPY . /app
21
+
22
+ # Install pip and set the PyPI mirror (Aliyun)
23
+ RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \
24
+ && pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
25
+
26
+ # Install dependencies directly
27
+ RUN pip3 install --no-cache-dir -r requirements.txt
28
+
29
+ # Make the start script executable
30
+ RUN chmod +x start.sh
31
+
32
+ # Command to run on container start
33
+ CMD ["./start.sh"]