Skip to content

Commit

Permalink
Docker 相关功能修复 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuaki1009 committed Mar 11, 2023
1 parent d3870be commit 8d73a42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ yunzai
/data/
/temp/
/pnpm-lock.yaml
/entrypoint.sh
9 changes: 6 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY --from=resource /res/ffmpeg/ffprobe /usr/bin/ffprobe
RUN sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y curl wget gnupg git python3-pip fonts-wqy-microhei xfonts-utils chromium fontconfig libxss1 libgl1 \
&& apt-get install -y curl wget gnupg git python3-pip python3-venv fonts-wqy-microhei xfonts-utils chromium fontconfig libxss1 libgl1 \
&& apt-get autoremove \
&& apt-get clean

Expand All @@ -37,8 +37,11 @@ RUN git config --global --add safe.directory '*' \
RUN npm install pnpm -g

RUN ln -s /usr/bin/python3 /usr/bin/python \
&& curl -fsSL https://install.python-poetry.org | python - \
&& ln -s /$HOME/.local/bin/poetry /usr/bin \
&& POETRY_HOME=$HOME/venv-poetry \
&& python -m venv $POETRY_HOME \
&& $POETRY_HOME/bin/pip install --upgrade pip setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple \
&& $POETRY_HOME/bin/pip install poetry -i https://pypi.tuna.tsinghua.edu.cn/simple \
&& ln -s $POETRY_HOME/bin/poetry /usr/bin \
&& poetry config virtualenvs.in-project true

RUN rm -rf /var/cache/* \
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ if [[ -z $(git status -s) ]]; then
echo -e " ${Warn} ${YellowBG} 当前工作区有修改,尝试暂存后更新。${Font}"
git add .
git stash
git pull origin main --allow-unrelated-histories --rebase
git pull origin master --allow-unrelated-histories --rebase
git stash pop
else
git pull origin main --allow-unrelated-histories
git pull origin master --allow-unrelated-histories
fi

if [[ ! -f "$HOME/.ovo/yunzai.ok" ]]; then
Expand Down

0 comments on commit 8d73a42

Please sign in to comment.