FROM sapmachine:17.0.13 LABEL maintainer=axel.uhl@sap.com # Download and extract the release WORKDIR /home/sailing RUN chmod 777 /home/sailing; mkdir logs; mkdir dump RUN apt-get -y update; apt-get -y upgrade; apt-get -y install apt-utils wget curl RUN curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - RUN echo "deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" >/etc/apt/sources.list.d/mongodb-org-4.4.list RUN apt-get update \ && apt-get install -y vim mongodb-org-shell COPY vimrc /root/.vimrc RUN wget -O /tmp/rds.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem \ && ${JAVA_HOME}/bin/keytool -importcert -alias AWSRDS -file /tmp/rds.pem -keystore ${JAVA_HOME}/lib/security/cacerts -noprompt -storepass changeit \ && rm /tmp/rds.pem RUN wget -O /home/sailing/WindEstimationModelsTraining.jar https://static.sapsailing.com/WindEstimationModelsTraining.jar CMD exec java "${MEMORY}" -Dmongo.uri="${MONGODB_URI}" -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump/ -Xlog:gc*=info,gc+region*=info,gc+ergo*=info,gc+humongous*=info,gc+liveness=trace:file=logs/gc.log:time,level,tags:filecount=10,filesize=100000000 -jar WindEstimationModelsTraining.jar "${BEARER_TOKEN}" ${TRAINING_DATA_PERCENT}