wx_post/dockerfile
xuthus a933a35bcd
Some checks failed
wx_post / wx_post-Gitea-Actions (push) Failing after 21s
测试CI/CD
2024-04-15 22:29:53 +08:00

15 lines
762 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#penjdk:8-jre 为基础镜像,来构建此镜像,可以理解为运行的需要基础环境
FROM openjdk:8-jre
#WORKDIR指令用于指定容器的一个目录 容器启动时执行的命令会在该目录下执行。
WORKDIR /opt/docker/images/metabase/
#将当前metabase.jar 复制到容器根目录下
ADD metabase.jar metabase.jar
#将依赖包 复制到容器根目录/libs下,metabase.jar已不再需要添加其它jar包
#ADD libs /libs
#暴露容器端口为3000 Docker镜像告知Docker宿主机应用监听了3000端口
EXPOSE 3000
#容器启动时执行的命令
CMD java -jar metabase.jar
//docker build // . 表示当前目录 -f 参数指定Dockerfile文件 -t 表示 制作的镜像:tag docker build -f DockerFile -t test/metabase:1.0.0 .