Git Product home page Git Product logo

Comments (4)

jeffreymurdock avatar jeffreymurdock commented on May 27, 2024

add this into tws Dockerfile
RUN sed -i -e 's/\r$//' runscript.sh
RUN sed -i -e 's/\r$//' /usr/bin/xvfb-daemon-run
RUN sed -i -e 's/\r$//' /etc/init.d/xvfb
RUN sed -i -e 's/\r$//' /etc/init.d/vnc
RUN sed -i -e 's/\r$//' /root/Jts/jts.ini
RUN sed -i -e 's/\r$//' /root/IBController/IBController.ini

from ib-gateway-docker.

mvperez avatar mvperez commented on May 27, 2024

Hi @jeffreymurdock ,
Thanks for that. I also added these two lines to add jts.ini and IBController.ini

ADD ./ib/jts.ini /root/Jts/jts.ini
ADD ./ib/IBController.ini /root/IBController/IBController.ini

Save my Dockerfile and run "docker-compose up --build" again. It seems to start properly the container. But when I view TWS in VNC it seems the gateway connection repeatedly restarting (disconnected/connected status).

screen shot 2018-09-22 at 5 44 14 pm

Here's my full Dockerfile

FROM ubuntu:16.04
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

# Setup IB TWS
RUN mkdir -p /opt/TWS
WORKDIR /opt/TWS
RUN wget -q http://one-algo.s3.amazonaws.com/ibgateway-latest-standalone-linux-x64-v972.1k.sh
RUN chmod a+x ibgateway-latest-standalone-linux-x64-v972.1k.sh

# Setup  IBController
RUN mkdir -p /opt/IBController/
WORKDIR /opt/IBController/
RUN wget -q http://one-algo.s3.amazonaws.com/IBController-QuantConnect-3.2.0.zip
RUN unzip ./IBController-QuantConnect-3.2.0.zip
RUN chmod -R u+x *.sh && chmod -R u+x Scripts/*.sh

# Install Java 8 TODO maybe just use "from:java8"
RUN \
  echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
  add-apt-repository -y ppa:webupd8team/java && \
  apt-get update && \
  apt-get install -y oracle-java8-installer && \
  rm -rf /var/lib/apt/lists/* && \
  rm -rf /var/cache/oracle-jdk8-installer

WORKDIR /

# Install TWS
RUN yes n | /opt/TWS/ibgateway-latest-standalone-linux-x64-v972.1k.sh

#CMD yes

# Launch a virtual screen (this seems to be broken)
#RUN Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
#RUN export DISPLAY=:1

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
ADD ./ib/jts.ini /root/Jts/jts.ini
ADD ./ib/IBController.ini /root/IBController/IBController.ini

RUN chmod -R u+x runscript.sh && chmod -R 777 /usr/bin/xvfb-daemon-run
RUN chmod 777 /etc/init.d/xvfb
RUN chmod 777 /etc/init.d/vnc

RUN sed -i -e 's/\r$//' runscript.sh
RUN sed -i -e 's/\r$//' /usr/bin/xvfb-daemon-run
RUN sed -i -e 's/\r$//' /etc/init.d/xvfb
RUN sed -i -e 's/\r$//' /etc/init.d/vnc
RUN sed -i -e 's/\r$//' /root/Jts/jts.ini
RUN sed -i -e 's/\r$//' /root/IBController/IBController.ini

CMD bash runscript.sh

from ib-gateway-docker.

mvberg avatar mvberg commented on May 27, 2024

@marvinvperez

  1. hm, never had that on Windows - checking ...
  2. are you using the e-demo credentials for IB or an actual login?

from ib-gateway-docker.

mvperez avatar mvperez commented on May 27, 2024

Nope. I'm using another account which is working fine in mac.

UPDATE: I think I found possible root cause here. I've learned you can't login same account at the same time. One will automatically logout. I will confirm it when I get into the machine and update this issue again.

from ib-gateway-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.