1)进入指定的容器
docker exec -it demo /bin/bash
2)下载curl
root@89a67e345354:/# apt install curl -y
3)下载arthas
root@89a67e345354:/# curl -O https://arthas.aliyun.com/arthas-boot.jar
4)运行
root@89a67e345354:/# java -jar arthas-boot.jar
5)监控
[arthas@1]$ profiler start -e alloc
[arthas@1]$ profiler stop --format html
root@89a67e345354:/# exit