mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-08 21:15:46 +08:00
⚡️ Optimize Dockerfile (#25)
* 新增Docker部署脚本
* 🚨 `pre-commit-ci`修复格式错误
* 修复Docker部署说明
* Optimize Dockerfile
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
3e299aa094
commit
5cccdd3d1a
32
Dockerfile
32
Dockerfile
@ -6,25 +6,17 @@ ENV PATH="${PATH}:/root/.local/bin"
|
|||||||
|
|
||||||
ADD ./ /app/
|
ADD ./ /app/
|
||||||
|
|
||||||
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak \
|
RUN sed -i 's/http:\/\/deb.debian.org/http:\/\/ftp.cn.debian.org/g' /etc/apt/sources.list \
|
||||||
&& echo "deb http://ftp.cn.debian.org/debian/ bullseye main non-free contrib" >/etc/apt/sources.list \
|
&& sed -i 's/http:\/\/security.debian.org/http:\/\/mirrors.ustc.edu.cn/g' /etc/apt/sources.list \
|
||||||
&& echo "deb http://ftp.cn.debian.org/debian/ bullseye-updates main non-free contrib" >>/etc/apt/sources.list \
|
&& apt-get update -y \
|
||||||
&& echo "deb http://ftp.cn.debian.org/debian/ bullseye-backports main non-free contrib" >>/etc/apt/sources.list \
|
&& apt-get upgrade -y \
|
||||||
&& echo "deb-src http://ftp.cn.debian.org/debian/ bullseye main non-free contrib" >>/etc/apt/sources.list \
|
&& apt install curl git -y \
|
||||||
&& echo "deb-src http://ftp.cn.debian.org/debian/ bullseye-updates main non-free contrib" >>/etc/apt/sources.list \
|
&& apt-get autoremove \
|
||||||
&& echo "deb-src http://ftp.cn.debian.org/debian/ bullseye-backports main non-free contrib" >>/etc/apt/sources.list \
|
&& apt-get clean \
|
||||||
&& echo "deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib" >>/etc/apt/sources.list \
|
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
&& echo "deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib" >>/etc/apt/sources.list \
|
&& pip install --no-cache-dir --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
|
||||||
&& rm -rf /var/lib/apt/lists/* && apt-get update
|
&& pip install poetry -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
|
||||||
|
&& poetry install && \
|
||||||
RUN apt install curl git -y
|
&& rm -rf /app/*
|
||||||
|
|
||||||
RUN /usr/local/bin/python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
|
|
||||||
RUN /usr/local/bin/python -m pip install --no-cache-dir --upgrade --quiet pip
|
|
||||||
|
|
||||||
RUN /usr/local/bin/python -m pip install poetry
|
|
||||||
|
|
||||||
RUN poetry install && rm -rf /app/*
|
|
||||||
|
|
||||||
CMD poetry run python3 core.py
|
CMD poetry run python3 core.py
|
||||||
|
@ -73,6 +73,14 @@ cd plugins
|
|||||||
git clone -b v4 https://ghproxy.com/https://github.com/KimigaiiWuyi/GenshinUID.git --depth=1 --single-branch
|
git clone -b v4 https://ghproxy.com/https://github.com/KimigaiiWuyi/GenshinUID.git --depth=1 --single-branch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2. 安装所需插件
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 安装v4 GenshinUID
|
||||||
|
cd plugins
|
||||||
|
git clone -b v4 https://ghproxy.com/https://github.com/KimigaiiWuyi/GenshinUID.git --depth=1 --single-branch
|
||||||
|
```
|
||||||
|
|
||||||
2. Docker Compose启动
|
2. Docker Compose启动
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
Loading…
x
Reference in New Issue
Block a user