很奇怪的問題,可是jstack能夠執行html
解決方法:docker
docker 內部使用jmap 須要啓動容器時候配置權限:docker run --privileged=true --cap-add=SYS_PTRACEspa
配置dokcerfile文件:.net
if [[ ! -z $level ]];then docker run -d \ -v ${localtime}:${localtime}:ro \ -v ${confdir}:${confdir} \ -v ${logdir}:${logdir} \ -v ${nfsdir1}:${nfsdir1} \ -v ${nfsdir2}:${nfsdir2} \ -v ${nfsdir3}:${nfsdir3} \ -v ${jprofiler9dir}:${jprofiler9dir} \ -e JAVA_HOME=/opt/jdk \ -e TERM=xterm \ -e PATH=${docker_path} \ --restart=on-failure:3 \ --net host \ --privileged=true \ --cap-add=SYS_PTRACE \ --name ${projname} ${repository}:${tag_after_check} >/dev/null 2>&1
添加後執行後從新構建dockerrest
折騰了的好久的問題終於解決了code
參考:htm
https://www.cnblogs.com/vikings-blog/p/4238062.htmlblog
https://www.runoob.com/docker/docker-run-command.htmlit
https://www.cnblogs.com/yfalcon/p/9044246.htmlclass
https://blog.csdn.net/ynhzdxc/article/details/63692636
https://www.v2ex.com/t/235726