# FROM alibabadragonwell/dragonwell:8.20.21
FROM registry.cn-hangzhou.aliyuncs.com/fullstack/dragonwell8

WORKDIR /app

ADD target/chsm-web-manager.jar /app/chsm-web-manager.jar
ENV ENABLE_DEBUG=false
ENV DEBUG_PORT=5005
EXPOSE 9880
# ENTRYPOINT ["insmod","/opt/driver/SJK1117-H/SJK1117_H.ko"]
# ENTRYPOINT ["/bin/bash", "/opt/driver/SYD1308-G/install_driver.sh"]
# ENTRYPOINT ["java","-jar","chsm-manage.jar"]
ENTRYPOINT ["/bin/bash", "-c", "if [ \"$ENABLE_DEBUG\" = \"true\" ]; then java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$DEBUG_PORT -jar chsm-web-manager.jar; else java -jar chsm-web-manager.jar; fi"]
