Код: Выделить всё
FROM amazoncorretto:21.0.4
ENV JAVA_TOOL_OPTIONS="-Xms2g -Xmx8g -XX:MaxMetaspaceSize=512M -XX:+UseG1GC --add-opens java.base/java.lang=ALL-UNNAMED"
# Add the JAR file to the container
ADD target/evaluation-service.jar evaluation-service.jar
# Define the entry point
ENTRYPOINT ["java", "-jar", "evaluation-service.jar"]
Код: Выделить всё
docker run --platform linux/arm64 -d --expose 8302 -p 8302:8302 --memory=8g --name evaluation 285bc34ead55 --server.port=8302
Код: Выделить всё
Picked up JAVA_TOOL_OPTIONS: -Xms2g -Xmx8g -XX:MaxMetaspaceSize=512M -XX:+UseG1GC --add-opens java.base/java.lang=ALL-UNNAMED
Unrecognized option: --add-opens
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit
Подробнее здесь: https://stackoverflow.com/questions/789 ... cker-image