这正在使用我的Dockerfile
FROM lpicanco/java11-alpine
VOLUME /tmp
ADD knetconfig /tmp/knetconfig
ADD grpc_health_probe_linux_x64 /app/grpc_health_probe_linux_x64
RUN chmod +x /app/grpc_health_probe_linux_x64
ADD aero-pay-core-service-latest.jar app.jar
RUN sh -c 'touch /app.jar'
EXPOSE 5005
ENV JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Djava.security.egd=file:/dev/./urandom"
ENTRYPOINT java $JAVA_OPTS -jar /app.jar
但在构建时出现此错误,我使用的是java 11,
Error occurred during initialization of VM
Could not find agent library jdwp on the library path, with error: libjdwp.so: cannot open shared object file: No such file or directory
最好的选择是什么?
1条答案
按热度按时间5cg8jx4n1#
可能是JDK11的alpine版本被调整为最小化内存占用。可能是调试库被删除或从未安装。