wx_post/dockerfile
xuthus 374b0293fa
All checks were successful
wx_post / wx_post-Gitea-Actions (push) Successful in 11m49s
测试CI/CD
2024-04-16 01:21:43 +08:00

15 lines
769 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 /workspace/xuthus/wx_post/
#将当前metabase.jar 复制到容器根目录下
ADD target/wx_post-0.0.1.jar wx_post.jar
#将依赖包 复制到容器根目录/libs下,metabase.jar已不再需要添加其它jar包
#ADD libs /libs
#暴露容器端口为3000 Docker镜像告知Docker宿主机应用监听了3000端口
EXPOSE 8180
#容器启动时执行的命令
CMD java -jar wx_post.jar
#docker build // . 表示当前目录 -f 参数指定Dockerfile文件 -t 表示 制作的镜像:tag docker build -f DockerFile -t test/metabase:1.0.0 .