keepmove commited on
Commit
3828b6b
·
verified ·
1 Parent(s): 9e60452

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -11
Dockerfile CHANGED
@@ -1,17 +1,27 @@
1
- # 基础镜像
2
- FROM python:3.9-slim
3
 
4
- # 安装必要的依赖
5
- RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
6
 
7
- # 创建安装目录
8
- RUN mkdir -p /usr/local/h-ui/
9
 
10
- # 下载 h-ui 二进制文件并赋予执行权限
11
- RUN curl -fsSL https://github.com/jonssonyan/h-ui/releases/latest/download/h-ui-linux-amd64 -o /usr/local/h-ui/h-ui && chmod +x /usr/local/h-ui/h-ui
12
 
13
- # 创建运行目录
14
- WORKDIR /usr/local/h-ui/
15
 
16
- # 设置启动命令
 
 
 
 
 
 
 
 
 
 
17
  CMD ["./h-ui", "-p", "8081"]
 
1
+ # 使用指定的基础镜像
2
+ FROM jonssonyan/h-ui
3
 
4
+ # 设置工作目录
5
+ WORKDIR /h-ui
6
 
7
+ # 安装 curl
8
+ RUN apk add --no-cache curl
9
 
10
+ # 测试网络连接
11
+ RUN curl -I https://github.com
12
 
13
+ # 创建 bin 目录
14
+ RUN mkdir -p /h-ui/bin
15
 
16
+ # 下载 hysteria2 二进制文件
17
+ RUN curl -L -o /h-ui/bin/hysteria2 https://github.com/apernet/hysteria/releases/latest/download/hysteria-linux-amd64 && \
18
+ chmod +x /h-ui/bin/hysteria2
19
+
20
+ # 创建 logs、data 和 export 目录并授予写权限
21
+ RUN mkdir -p /h-ui/logs /h-ui/data /h-ui/export && chmod -R 777 /h-ui/logs /h-ui/data /h-ui/export
22
+
23
+ # 暴露8081端口
24
+ EXPOSE 8081
25
+
26
+ # 启动命令
27
  CMD ["./h-ui", "-p", "8081"]