Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
# 创建非 root 用户
|
| 4 |
RUN adduser --uid 1000 --disabled-password --gecos "" user && mkdir -p /app && chown -R user /app
|
| 5 |
USER user
|
|
@@ -8,7 +11,7 @@ WORKDIR /app
|
|
| 8 |
# 复制二进制文件
|
| 9 |
COPY hdapi-linux-amd64 /app/hdhive-test
|
| 10 |
|
| 11 |
-
# 给二进制添加执行权限(需要临时切
|
| 12 |
USER root
|
| 13 |
RUN chmod +x /app/hdhive-test
|
| 14 |
USER user
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
+
# 安装 CA 证书
|
| 4 |
+
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 5 |
+
|
| 6 |
# 创建非 root 用户
|
| 7 |
RUN adduser --uid 1000 --disabled-password --gecos "" user && mkdir -p /app && chown -R user /app
|
| 8 |
USER user
|
|
|
|
| 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
|