Docker 镜像集成 Arthas
很多时候,应用在 docker 里出现 arthas 无法工作的问题,是因为应用没有安装 JDK ,而是安装了 JRE 。如果只安装了 JRE,则会缺少很多 JAVA 的命令行工具和类库,Arthas 也没办法正常工作。下面介绍两种常见的在 Docker 里使用 JDK 的方式。
参考:
https://arthas.aliyun.com/doc/docker.html
https://blog.51cto.com/daisywei/2427434
基于 Alpine 镜像
https://hub.docker.com/_/openjdk/
比如:
把 Arthas 安装到基础镜像里
安装 Arthas 会用到的依赖
Spring Boot 项目 Dockerfile 示例:
作者:Jeebiz 创建时间:2023-02-12 01:48
最后编辑:Jeebiz 更新时间:2025-04-24 16:40
最后编辑:Jeebiz 更新时间:2025-04-24 16:40