运行图像时出错:C:\Users\10649404\Desktop\spring-boot-websocket-chat-demo>docker run -p 5000:8080 ok 2019-04-29 07:10:58.660 INFO org.glowroot - Glowroot 版本:0.10.12,内置2018-06-22 00:08:17 +0000 2019-04-29 07:10:58.673 信息 org.glowroot-Java 版本:1.8.0_201这是我没有得到的 jar 文件。它说失踪lib/glowroot-embedded-collector.jar,即使它存在于该位置。2019-04-29 07:10:58.682 ERROR org.glowroot - missing lib/glowroot-embedded-collector.jar2019-04-29 07:10:58.688 ERROR org.glowroot - Glowroot not started: org.glowroot.agent.embedded.init.EmbeddedGlowrootAgentInitFactoryjava.lang.ClassNotFoundException: org.glowroot.agent.embedded.init.EmbeddedGlowrootAgentInitFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.glowroot.agent.MainEntryPoint.createGlowrootAgentInit(MainEntryPoint.java:311) at org.glowroot.agent.MainEntryPoint.start(MainEntryPoint.java:273) at org.glowroot.agent.MainEntryPoint.premain(MainEntryPoint.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.glowroot.agent.AgentPremain.premain(AgentPremain.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1 回答

慕妹3242003
TA贡献1824条经验 获得超6个赞
在您的 Dockerfile 中,您有:
ADD /opt/glowroot/lib/glowroot-embedded-collector.jar glowroot-embedded-collector.jar
这会复制根目录中的 jar 文件,以便在以下位置获得它:/glowroot-embedded-collector.jar
当您说 lib/glowroot-embedded-collector.jar 可用时,您是指在主机上还是在容器内?因为根据您的 Dockerfile,我认为它不能出现在容器中。
也许尝试以这种方式更改 ADD 语句:
ADD /opt/glowroot/lib/glowroot-embedded-collector.jar lib/glowroot-embedded-collector.jar
添加回答
举报
0/150
提交
取消