-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (18 loc) · 988 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM docker.io/library/eclipse-temurin:21-jre-alpine
EXPOSE 5000
ENV PACKAGE=clientportal.gw.zip
WORKDIR /client-portal
RUN apk add unzip curl sed
RUN curl -Lo /jolokia-jvm.jar https://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-agent-jvm/2.0.0/jolokia-agent-jvm-2.0.0-javaagent.jar
RUN curl -LO https://download2.interactivebrokers.com/portal/${PACKAGE} &&\
sha256sum ${PACKAGE} > ${PACKAGE}.sha256 &&\
unzip ${PACKAGE} &&\
rm -f ${PACKAGE}
RUN sed -i 's/^\s\{4\}//g' root/conf.yaml &&\
sed -i 's/allow:/allow:\n - 10.*\n - 172.*/g' root/conf.yaml &&\
sed -i 's&#!/bin/bash&#!/bin/ash&g' bin/run.sh &&\
sed -i 's#^java#java ${JAVA_OPTS}#g' bin/run.sh &&\
sed -i "s/#export\ JAVA_HOME=.*/export JAVA_HOME=\/opt\/java\/openjdk/g" bin/run.sh &&\
sed -i 's/^name=$(basename $config_path)/name=$(basename $config_file)/g' bin/run.sh &&\
sed -i 's/^--conf.*/--conf $name/g' bin/run.sh
CMD /client-portal/bin/run.sh root/conf.yaml