File size: 495 Bytes
4ec87ee
d9cdb03
4ec87ee
c7debd9
 
8d49988
b6d232d
d9cdb03
 
 
8d49988
7e51849
 
4ec87ee
b6d232d
 
 
 
d9cdb03
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM debian:bullseye-slim

# 安装 CA 证书(HTTPS 必需)
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

# 创建非 root 用户
RUN adduser --uid 1000 --disabled-password --gecos "" user && mkdir -p /app && chown -R user /app
USER user
WORKDIR /app

# 复制二进制文件
COPY hdapi-linux-amd64 /app/hdhive-test

# 添加执行权限(临时切换 root)
USER root
RUN chmod +x /app/hdhive-test
USER user

EXPOSE 8890
CMD ["/app/hdhive-test"]