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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -19
Dockerfile CHANGED
@@ -1,25 +1,17 @@
1
- # 使用指定的基础镜像
2
- FROM jonssonyan/h-ui
3
 
4
- # 设置工作目录
5
- WORKDIR /h-ui
6
 
7
- # 安装 curl
8
- RUN apk add --no-cache curl
9
 
10
- # 创建 bin 目录
11
- RUN mkdir -p /h-ui/bin
12
 
13
- # 下载 hysteria 二进制文件并重命名为 hysteria2
14
- RUN curl -L -o /h-ui/bin/hysteria https://github.com/apernet/hysteria/releases/download/v2.5.1/hysteria-linux-amd64 && \
15
- mv /h-ui/bin/hysteria /h-ui/bin/hysteria2 && \
16
- chmod +x /h-ui/bin/hysteria2
17
 
18
- # 创建 logs、data 和 export 目录并授予写权限
19
- RUN mkdir -p /h-ui/logs /h-ui/data /h-ui/export && chmod -R 777 /h-ui/logs /h-ui/data /h-ui/export
20
-
21
- # 暴露8081端口
22
- EXPOSE 8081
23
-
24
- # 启动命令
25
  CMD ["./h-ui", "-p", "8081"]
 
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"]