From 61cb7d4e72361d317e4cb873ed1a10b75716dc0a Mon Sep 17 00:00:00 2001 From: KAAAsS Date: Mon, 1 Jul 2024 15:26:46 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E5=A2=9E=E5=8A=A0=20Docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++++++ build-and-publish.sh | 5 +++++ docker-run.sh | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 Dockerfile create mode 100755 build-and-publish.sh create mode 100755 docker-run.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8b1f851 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/build-and-publish.sh b/build-and-publish.sh new file mode 100755 index 0000000..94fa997 --- /dev/null +++ b/build-and-publish.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +docker build -t reg.kas.pub/bhyg --network host . +docker push reg.kas.pub/bhyg diff --git a/docker-run.sh b/docker-run.sh new file mode 100755 index 0000000..0cbcd42 --- /dev/null +++ b/docker-run.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +docker run -v $(pwd):/app -it reg.kas.pub/bhyg $@