Skip to content

Commit

Permalink
chore: Modify Dockerfile to speed up docker build speed.
Browse files Browse the repository at this point in the history
  • Loading branch information
vvbbnn00 committed Jan 29, 2024
1 parent 2db52a1 commit 523ba61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ FROM python:3.11-alpine
WORKDIR /app
COPY . .

# Check If in Github Actions, if not, change Alpine source to Aliyun
# Check if in Github Actions, if not, change Alpine source to Aliyun
ARG GITHUB_ACTIONS
RUN if [ -z "$GITHUB_ACTIONS" ]; then sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; fi
RUN if [ "$GITHUB_ACTIONS" != "true" ]; then \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
fi

# Install dependencies
RUN apk add --no-cache bash build-base libffi-dev openssl-dev
Expand All @@ -14,4 +16,3 @@ RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.ustc.edu.c
RUN chmod +x ./scripts/*.sh

CMD ["/bin/sh", "./scripts/run.sh"]

0 comments on commit 523ba61

Please sign in to comment.