summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzy <[email protected]>2023-12-05 00:50:38 -0500
committerzy <[email protected]>2023-12-05 00:50:38 -0500
commit81c65e41aa82455b94580fd0b755d597155ebf8b (patch)
tree37d42a7fc787eb5028c8f96d15ccf4e22ac8a8bb
parent426feac72ab87bd7f1f9c28aeeea5ca834384f55 (diff)
userstack-docker
-rw-r--r--Dockerfile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c87af49
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+# 使用最小的 alpine 镜像作为基础
+# FROM debian
+FROM rockylinux:8.8.20230518
+
+# 安装 RPM 文件
+# RUN dnf install -y /diagnose-tools-2.1-release.el8.x86_64.rpm && \
+# rm -f /diagnose-tools-2.1-release.el8.x86_64.rpm
+
+# 拷贝本地的 ./build/userstack 可执行文件到镜像的根目录
+COPY build/userstack /userstack
+# 使拷贝进去的 userstack 文件可执行
+RUN ls /
+RUN chmod +x /userstack
+
+# copy 并安装 /root/diagnose-tools/rpmbuild/RPMS/x86_64/diagnose-tools-2.1-release.el8.x86_64.rpm
+# 拷贝 RPM 文件到 Docker 镜像中
+COPY /diagnose-tools-2.1-release.el8.x86_64.rpm /
+
+# 设置容器启动时运行的命令
+ENTRYPOINT ["/userstack"] \ No newline at end of file