Update Dockerfile
Browse files- Dockerfile +3 -6
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
# 安装 CA 证书
|
| 4 |
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
# 创建非 root 用户
|
|
@@ -11,13 +11,10 @@ WORKDIR /app
|
|
| 11 |
# 复制二进制文件
|
| 12 |
COPY hdapi-linux-amd64 /app/hdhive-test
|
| 13 |
|
| 14 |
-
#
|
| 15 |
USER root
|
| 16 |
RUN chmod +x /app/hdhive-test
|
| 17 |
USER user
|
| 18 |
|
| 19 |
-
# 暴露端口
|
| 20 |
EXPOSE 8890
|
| 21 |
-
|
| 22 |
-
# 启动程序
|
| 23 |
CMD ["/app/hdhive-test"]
|
|
|
|
| 1 |
+
FROM debian:bullseye-slim
|
| 2 |
|
| 3 |
+
# 安装 CA 证书(HTTPS 必需)
|
| 4 |
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
# 创建非 root 用户
|
|
|
|
| 11 |
# 复制二进制文件
|
| 12 |
COPY hdapi-linux-amd64 /app/hdhive-test
|
| 13 |
|
| 14 |
+
# 添加执行权限(临时切换 root)
|
| 15 |
USER root
|
| 16 |
RUN chmod +x /app/hdhive-test
|
| 17 |
USER user
|
| 18 |
|
|
|
|
| 19 |
EXPOSE 8890
|
|
|
|
|
|
|
| 20 |
CMD ["/app/hdhive-test"]
|