Move running image to ibm-semeru and introduce runner script (#111)

Signed-off-by: Jun Woo Shin <jwoos@meta.com>
This commit is contained in:
Jun Woo Shin
2022-10-26 16:37:43 -04:00
committed by GitHub
parent c22ebeea31
commit a54f9a48be
2 changed files with 21 additions and 9 deletions

View File

@@ -3,18 +3,19 @@ WORKDIR /usr/src/java
COPY . .
RUN mvn clean package -pl owrrm -am -DappendVersionString="$(./scripts/get_build_version.sh)"
FROM adoptopenjdk/openjdk11-openj9:latest
RUN apt-get update && apt-get install -y gettext-base wget
RUN wget https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-deploy/main/docker-compose/certs/restapi-ca.pem \
-O /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
FROM ibm-semeru-runtimes:open-11-jre
RUN apt-get update && apt-get install -y gettext-base
ADD https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-deploy/main/docker-compose/certs/restapi-ca.pem \
/usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
RUN mkdir /owrrm-data
WORKDIR /usr/src/java
COPY docker-entrypoint.sh /
COPY runner.sh /
COPY --from=build /usr/src/java/owrrm/target/openwifi-rrm.jar /usr/local/bin/
EXPOSE 16789 16790
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["java", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", \
"-jar", "/usr/local/bin/openwifi-rrm.jar", \
"run", "--config-env", \
"-t", "/owrrm-data/topology.json", \
"-d", "/owrrm-data/device_config.json"]
CMD ["/runner.sh", "/usr/local/bin/openwifi-rrm.jar", \
"run", \
"--config-env", \
"-t", "/owrrm-data/topology.json", \
"-d", "/owrrm-data/device_config.json"]

11
runner.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env sh
BIN=$1
shift 1
echo $@
java \
-XX:+IdleTuningGcOnIdle -Xtune:virtualized \
-jar "$BIN" \
"$@"