build: 增加 Docker

This commit is contained in:
KAAAsS 2024-07-01 15:26:46 +08:00
parent 7c12c00e59
commit 61cb7d4e72
3 changed files with 18 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM python:3.12-slim
WORKDIR /app
#ENV RUSTUP_DIST_SERVER="https://rsproxy.cn"
#ENV RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
#RUN curl -sSf https://sh.rustup.rs | sh -s -- -y
COPY requirements.txt .
RUN python -m pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

5
build-and-publish.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
docker build -t reg.kas.pub/bhyg --network host .
docker push reg.kas.pub/bhyg

4
docker-run.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
set -e
docker run -v $(pwd):/app -it reg.kas.pub/bhyg $@