-
Notifications
You must be signed in to change notification settings - Fork 105
/
Dockerfile
56 lines (44 loc) · 1.67 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM ubuntu:16.04
LABEL maintainer="Mike Ehrenberg <[email protected]>"
RUN apt-get update \
&& apt-get install -y wget \
&& apt-get install -y unzip \
&& apt-get install -y xvfb \
&& apt-get install -y libxtst6 \
&& apt-get install -y libxrender1 \
&& apt-get install -y libxi6 \
&& apt-get install -y x11vnc \
&& apt-get install -y socat \
&& apt-get install -y software-properties-common \
&& apt-get install -y dos2unix
# Setup IB TWS
RUN mkdir -p /opt/TWS
WORKDIR /opt/TWS
RUN wget -q http://cdn.quantconnect.com/interactive/ibgateway-latest-standalone-linux-x64-v974.4g.sh
RUN chmod a+x ibgateway-latest-standalone-linux-x64-v974.4g.sh
# Setup IBController
RUN mkdir -p /opt/IBController/ && mkdir -p /opt/IBController/Logs
WORKDIR /opt/IBController/
RUN wget -q http://cdn.quantconnect.com/interactive/IBController-QuantConnect-3.2.0.5.zip
RUN unzip ./IBController-QuantConnect-3.2.0.5.zip
RUN chmod -R u+x *.sh && chmod -R u+x Scripts/*.sh
WORKDIR /
# Install TWS
RUN yes n | /opt/TWS/ibgateway-latest-standalone-linux-x64-v974.4g.sh
ENV DISPLAY :0
ADD runscript.sh runscript.sh
ADD ./vnc/xvfb_init /etc/init.d/xvfb
ADD ./vnc/vnc_init /etc/init.d/vnc
ADD ./vnc/xvfb-daemon-run /usr/bin/xvfb-daemon-run
RUN chmod -R u+x runscript.sh \
&& chmod -R 777 /usr/bin/xvfb-daemon-run \
&& chmod 777 /etc/init.d/xvfb \
&& chmod 777 /etc/init.d/vnc
RUN dos2unix /usr/bin/xvfb-daemon-run \
&& dos2unix /etc/init.d/xvfb \
&& dos2unix /etc/init.d/vnc \
&& dos2unix runscript.sh
# Below files copied during build to enable operation without volume mount
COPY ./ib/IBController.ini /root/IBController/IBController.ini
COPY ./ib/jts.ini /root/Jts/jts.ini
CMD bash runscript.sh