Reliable high-performance docker images to run Interactive Brokers Gateway and TWS without any human interaction.
Gateway:
docker pull danklabs/ib-gateway
TWS:
docker pull danklabs/ib-tws
There are two Docker images here, one for IB Gateway (stable and latest), and the other for Trader Workstation (stable and latest).
Both images include:
- IBC - to control IB Gateway (simulates user input).
- Xvfb - an X11 virtual framebuffer to run graphics applications without graphics hardware.
- x11vnc - a VNC server to interact with TWS or IB Gateway user interface.
The sample docker-compose.yml file documents the environmental variables that can be used to configure containers.
For practical purposes, you should be able to configure containers with the provided environmental variables, but if needed/desired you can mount a volume with a custom config file for Interactive Brokers Controller (IBC). The file should be mounted to /opt/ibc/ibc.ini
e.g.
volumes:
- $HOME/ibc.ini:/opt/ibc/ibc.ini
The ibc.empty.ini is an empty template configuration file that you can use for this purpose.
If desired, you can also mount volumes for custom TWS/Gateway jts.ini files:
Program | Release | Mount to |
---|---|---|
Gateway | Stable | /opt/ibgateway/latest/jts.ini |
Gateway | Latest | /opt/ibgateway/stable/jts.ini |
TWS | Stable | /Jts/stable/jts.ini |
TWS | Latest | /Jts/latest/jts.ini |