-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 使用官方的 Debian Buster Slim 作为基础镜像 | ||
FROM debian:buster-slim | ||
|
||
# 设置工作目录 | ||
WORKDIR /app | ||
|
||
# 将本地的 init.sh 脚本复制到镜像中的 /app 目录下 | ||
COPY init.sh /app/init.sh | ||
|
||
# 安装 curl 和 wget | ||
RUN apt-get update && apt-get install -y curl wget python3 python3-pip git | ||
|
||
# 开放容器的 8587 端口 | ||
EXPOSE 8587 | ||
|
||
# 定义容器启动时执行的命令,即运行 init.sh 脚本 | ||
CMD ["/bin/bash", "/app/init.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e # 设置遇到错误立即退出脚本 | ||
|
||
# 克隆仓库 | ||
echo "克隆仓库 ..." | ||
if ! git clone https://github.com/Biubush/alys.git; then | ||
echo "无法克隆仓库,请检查网络连接或仓库地址是否正确。" | ||
exit 1 | ||
fi | ||
cd alys || exit 1 | ||
|
||
# 安装依赖 | ||
echo "安装依赖 ..." | ||
if ! python3 -m pip install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt; then | ||
|
||
echo "安装依赖失败,请检查依赖是否正确配置或网络连接是否正常。" | ||
exit 1 | ||
fi | ||
|
||
# 运行 app.py | ||
echo "开始运行 alys程序 ..." | ||
if ! python3 app.py; then | ||
echo "启动应用程序失败,请检查应用程序是否正确配置。" | ||
exit 1 | ||
fi |
Binary file not shown.