forked from vvbbnn00/WARP-Clash-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 757 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.11-alpine
WORKDIR /app
# Install dependencies for building some Python packages
# Check if in Github Actions, if not, change Alpine source and PyPI source to Aliyun
ARG GITHUB_ACTIONS
RUN if [ "$GITHUB_ACTIONS" != "true" ]; then \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/; \
fi
RUN apk add --no-cache bash build-base libffi-dev openssl-dev gcompat
# Install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the code
COPY . .
RUN chmod +x ./scripts/*.sh
# Set environment variables
ENV RUN_IN_DOCKER=true
CMD ["/bin/sh", "./scripts/run.sh"]