mirror of https://github.com/yutto-dev/yutto
⚡️ perf: reduce docker image size
This commit is contained in:
parent
bbb349ae9a
commit
6f49b23515
10
Dockerfile
10
Dockerfile
|
@ -5,11 +5,11 @@ LABEL maintainer="siguremo" \
|
|||
|
||||
RUN set -x \
|
||||
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
||||
&& apk add -q --progress --update --no-cache --virtual .build-deps gcc g++ build-base \
|
||||
&& apk add -q --progress --update --no-cache ffmpeg python3 python3-dev py-pip linux-headers libffi-dev openssl-dev \
|
||||
&& python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
&& python3 -m pip install --no-cache-dir --pre yutto[uvloop] \
|
||||
&& apk del .build-deps
|
||||
&& apk add -q --progress --update --no-cache --virtual .build-deps gcc g++ build-base python3-dev libffi-dev \
|
||||
&& apk add -q --progress --update --no-cache ffmpeg python3 py-pip tzdata \
|
||||
&& python3 -m pip install --no-cache-dir --pre yutto[uvloop] -i https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& apk del --purge .build-deps
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
6
justfile
6
justfile
|
@ -1,5 +1,5 @@
|
|||
VERSION := `poetry run python -c "import sys; from yutto.__version__ import VERSION as yutto_version; sys.stdout.write(yutto_version)"`
|
||||
DOCKER_NAME := "siguremo/yutto:latest"
|
||||
DOCKER_NAME := "siguremo/yutto"
|
||||
|
||||
run:
|
||||
poetry run python -m yutto
|
||||
|
@ -47,7 +47,7 @@ clean-builds:
|
|||
rm -rf yutto.egg-info/
|
||||
|
||||
build-docker:
|
||||
docker build -t {{DOCKER_NAME}} .
|
||||
docker build -t "{{DOCKER_NAME}}:{{VERSION}}" -t "{{DOCKER_NAME}}:latest" .
|
||||
|
||||
publish-docker:
|
||||
docker buildx build --platform=linux/amd64,linux/arm64 -t {{DOCKER_NAME}} . --push
|
||||
docker buildx build --platform=linux/amd64,linux/arm64 -t "{{DOCKER_NAME}}:{{VERSION}}" -t "{{DOCKER_NAME}}:latest" . --push
|
||||
|
|
Loading…
Reference in New Issue