Skip to content

Commit 0dcea5d

Browse files
committed
Signed-off-by: gnzsnz <[email protected]>
1 parent 63fca7f commit 0dcea5d

File tree

9 files changed

+36
-17
lines changed

9 files changed

+36
-17
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ It includes:
2121

2222
| Channel | IB Gateway Version | IBC Version | Docker Tags |
2323
| -------- | ------------------ | ----------- | --------------------------- |
24-
| `latest` | `10.26.1h` | `3.18.0` | `latest` `10.26` `10.26.1h` |
25-
| `stable` | `10.19.2g` | `3.18.0` | `stable` `10.19` `10.19.2g` |
24+
| `latest` | `10.26.1i` | `3.18.0` | `latest` `10.19` `10.26.1i` |
25+
| `stable` | `10.19.2h` | `3.18.0` | `stable` `10.19` `10.19.2h` |
2626

2727
All [tags](https://github.com/gnzsnz/ib-gateway-docker/pkgs/container/ib-gateway/) are available in the container repository. IB Gateway and TWS share the same version numers and tags, TWS tags are available on it's [container repository](https://github.com/gnzsnz/ib-gateway-docker/pkgs/container/tws-rdesktop).
2828

@@ -59,6 +59,7 @@ services:
5959
TIME_ZONE: ${TIME_ZONE:-Etc/UTC}
6060
TZ: ${TIME_ZONE:-Etc/UTC}
6161
CUSTOM_CONFIG: ${CUSTOM_CONFIG:-NO}
62+
JAVA_HEAP_SIZE: ${JAVA_HEAP_SIZE:-}
6263
SSH_TUNNEL: ${SSH_TUNNEL:-}
6364
SSH_OPTIONS: ${SSH_OPTIONS:-}
6465
SSH_ALIVE_INTERVAL: ${SSH_ALIVE_INTERVAL:-}
@@ -100,6 +101,7 @@ All environment variables are common between ibgateway and TWS image, unless spe
100101
| `TIME_ZONE` | Support for timezone, see your TWS jts.ini file for [valid values](https://ibkrguides.com/tws/usersguidebook/configuretws/configgeneral.htm) on a [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This sets time zone for IB Gateway. If jts.ini exists it will not be set. if `TWS_SETTINGS_PATH` is set and stored in a volume, jts.ini will already exists so this will not be used. Examples `Europe/Paris`, `America/New_York`, `Asia/Tokyo`| "Etc/UTC" |
101102
| `TWS_SETTINGS_PATH` | Settings path used by IBC's parameter `--tws_settings_path`. Use with a volume to preserve settings in the volume. | |
102103
| `CUSTOM_CONFIG` | If set to `yes`, then `run.sh` will not generate config files using env variables. You should mount config files. Use with care and only if you know what you are doing. | NO |
104+
| `JAVA_HEAP_SIZE` | Set Java heap, default 768MB, TWS might need more. Proposed value 1024. Enter just the number, don't enter units, ex mb. See [Increase Memory Size for TWS](https://ibkrguides.com/tws/usersguidebook/priceriskanalytics/custommemory.htm) | **not defined** |
103105
| `SSH_TUNNEL` | If set to `yes` then `socat` won't start, instead a remote ssh tunnel is started. SSH keys should be provided to container through ~/.ssh volume. | **not defined** |
104106
| `SSH_OPTIONS` | additional options for [ssh](https://manpages.ubuntu.com/manpages/jammy/en/man1/ssh.1.html) client | **not defined** |
105107
| `SSH_ALIVE_INTERVAL` | [ssh](https://manpages.ubuntu.com/manpages/jammy/en/man1/ssh.1.html) `ServerAliveInterval` setting. Don't set it in `SSH_OPTIONS` as this behavior is undefined. | 20 |
@@ -132,6 +134,7 @@ SAVE_TWS_SETTINGS=
132134
RELOGIN_AFTER_2FA_TIMEOUT=yes
133135
TIME_ZONE=Europe/Lisbon
134136
CUSTOM_CONFIG=
137+
JAVA_HEAP_SIZE=
135138
SSH_TUNNEL=
136139
SSH_OPTIONS=
137140
SSH_ALIVE_INTERVAL=
@@ -401,6 +404,6 @@ https://github.com/gnzsnz/ib-gateway-docker/raw/gh-pages/ibgateway-releases/ibga
401404
`ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh`, where
402405
`{IB_GATEWAY_VERSION}` must match the version as configured on Dockerfile
403406
(first line)
404-
1. Download IBC and name the file `IBCLinux-${IBC_VERSION}.zip`, where
407+
1. Download IBC and name the file `IBCLinux-3.18.0.zip`, where
405408
`{IBC_VERSION}` must match the version as configured on Dockerfile
406409
1. Build and run: `docker-compose up --build`

latest/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
FROM ubuntu:22.04 as setup
99

10-
ENV IB_GATEWAY_VERSION=10.26.1h
10+
ENV IB_GATEWAY_VERSION=10.26.1i
1111
ENV IB_GATEWAY_RELEASE_CHANNEL=latest
1212
ENV IBC_VERSION=3.18.0
1313

@@ -48,7 +48,7 @@ COPY ./scripts /root/scripts
4848

4949
FROM ubuntu:22.04
5050

51-
ENV IB_GATEWAY_VERSION=10.26.1h
51+
ENV IB_GATEWAY_VERSION=10.26.1i
5252
# IB Gateway user constants
5353
ARG USER_ID="${USER_ID:-1000}"
5454
ARG USER_GID="${USER_GID:-1000}"

latest/Dockerfile.tws

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This is a dedicated stage used as source for needed files.
55
#
66
##############################################################################
7-
ARG IB_VERSION=10.26.1h
7+
ARG IB_VERSION=10.26.1i
88
FROM ghcr.io/gnzsnz/ib-gateway:${IB_VERSION} as setup
99

1010
WORKDIR /
@@ -15,7 +15,7 @@ WORKDIR /
1515

1616
FROM lscr.io/linuxserver/rdesktop:ubuntu-xfce
1717

18-
ENV IB_GATEWAY_VERSION=10.26.1h
18+
ENV IB_GATEWAY_VERSION=10.26.1i
1919
ENV IB_GATEWAY_RELEASE_CHANNEL=latest
2020
ENV IBC_VERSION=3.18.0
2121

stable/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
FROM ubuntu:22.04 as setup
99

10-
ENV IB_GATEWAY_VERSION=10.19.2g
10+
ENV IB_GATEWAY_VERSION=10.19.2h
1111
ENV IB_GATEWAY_RELEASE_CHANNEL=stable
1212
ENV IBC_VERSION=3.18.0
1313

@@ -48,7 +48,7 @@ COPY ./scripts /root/scripts
4848

4949
FROM ubuntu:22.04
5050

51-
ENV IB_GATEWAY_VERSION=10.19.2g
51+
ENV IB_GATEWAY_VERSION=10.19.2h
5252
# IB Gateway user constants
5353
ARG USER_ID="${USER_ID:-1000}"
5454
ARG USER_GID="${USER_GID:-1000}"

stable/Dockerfile.tws

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This is a dedicated stage used as source for needed files.
55
#
66
##############################################################################
7-
ARG IB_VERSION=10.19.2g
7+
ARG IB_VERSION=10.19.2h
88
FROM ghcr.io/gnzsnz/ib-gateway:${IB_VERSION} as setup
99

1010
WORKDIR /
@@ -15,7 +15,7 @@ WORKDIR /
1515

1616
FROM lscr.io/linuxserver/rdesktop:ubuntu-xfce
1717

18-
ENV IB_GATEWAY_VERSION=10.19.2g
18+
ENV IB_GATEWAY_VERSION=10.19.2h
1919
ENV IB_GATEWAY_RELEASE_CHANNEL=stable
2020
ENV IBC_VERSION=3.18.0
2121

@@ -34,12 +34,9 @@ ARG DEBIAN_FRONTEND=noninteractive
3434
RUN \
3535
apt-get update -y && \
3636
apt-get install --no-install-recommends --yes socat sshpass gettext-base \
37-
libnspr4 libnss3 libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 \
38-
libc6 libcairo2 libcrypto++8 libcups2 libdbus-1-3 libdrm2 libexpat1 \
39-
libfontconfig1 libgbm1 libgcc-s1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 \
40-
libpango-1.0-0 libpulse0 libx11-6 libxcb1 libxcomposite1 libxdamage1 \
41-
libxext6 libxfixes3 libxkbcommon0 libxrandr2 libxshmfence1 libxtst6 \
42-
xdg-utils && \
37+
libnspr4 libnss3 libcrypto++8 xdg-utils xfce4-cpugraph-plugin \
38+
xfce4-netload-plugin xfce4-taskmanager xfce4-xkb-plugin xfce4-notes \
39+
gvfs gvfs-backends gvfs-fuse && \
4340
apt-get clean && \
4441
rm -rf /var/lib/apt/lists/* # end
4542

stable/scripts/common.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ set_ports() {
116116
echo ".> SOCAT_PORT set to: ${SOCAT_PORT}"
117117

118118
}
119+
120+
set_java_heap() {
121+
if [ -n "${JAVA_HEAP_SIZE}" ]; then
122+
_vmpath="${TWS_PATH}/ibgateway/${IB_GATEWAY_VERSION}"
123+
_string="s/-Xmx768m/-Xmx${JAVA_HEAP_SIZE}m/g"
124+
sed -i "${_string}" "${_vmpath}/ibgateway.vmoptions"
125+
echo ".> Java heap size set to ${JAVA_HEAP_SIZE}m"
126+
else
127+
echo ".> Usign default Java heap size 768m."
128+
fi
129+
}

stable/scripts/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ apply_settings
7474
# set API and socat ports
7575
set_ports
7676

77+
# Java heap size
78+
set_java_heap
79+
7780
# forward ports, socat or ssh
7881
"${SCRIPT_PATH}/port_forwarding.sh" &
7982

stable/tws-scripts/run_tws.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ set_ports
4141
# apply settings
4242
apply_settings
4343

44+
# Java heap size
45+
set_java_heap
46+
4447
# forward ports, socat or ssh
4548
"${SCRIPT_PATH}/port_forwarding.sh" &
4649

template_README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ services:
5959
TIME_ZONE: ${TIME_ZONE:-Etc/UTC}
6060
TZ: ${TIME_ZONE:-Etc/UTC}
6161
CUSTOM_CONFIG: ${CUSTOM_CONFIG:-NO}
62+
JAVA_HEAP_SIZE: ${JAVA_HEAP_SIZE:-}
6263
SSH_TUNNEL: ${SSH_TUNNEL:-}
6364
SSH_OPTIONS: ${SSH_OPTIONS:-}
6465
SSH_ALIVE_INTERVAL: ${SSH_ALIVE_INTERVAL:-}
@@ -100,6 +101,7 @@ All environment variables are common between ibgateway and TWS image, unless spe
100101
| `TIME_ZONE` | Support for timezone, see your TWS jts.ini file for [valid values](https://ibkrguides.com/tws/usersguidebook/configuretws/configgeneral.htm) on a [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). This sets time zone for IB Gateway. If jts.ini exists it will not be set. if `TWS_SETTINGS_PATH` is set and stored in a volume, jts.ini will already exists so this will not be used. Examples `Europe/Paris`, `America/New_York`, `Asia/Tokyo`| "Etc/UTC" |
101102
| `TWS_SETTINGS_PATH` | Settings path used by IBC's parameter `--tws_settings_path`. Use with a volume to preserve settings in the volume. | |
102103
| `CUSTOM_CONFIG` | If set to `yes`, then `run.sh` will not generate config files using env variables. You should mount config files. Use with care and only if you know what you are doing. | NO |
104+
| `JAVA_HEAP_SIZE` | Set Java heap, default 768MB, TWS might need more. Proposed value 1024. Enter just the number, don't enter units, ex mb. See [Increase Memory Size for TWS](https://ibkrguides.com/tws/usersguidebook/priceriskanalytics/custommemory.htm) | **not defined** |
103105
| `SSH_TUNNEL` | If set to `yes` then `socat` won't start, instead a remote ssh tunnel is started. SSH keys should be provided to container through ~/.ssh volume. | **not defined** |
104106
| `SSH_OPTIONS` | additional options for [ssh](https://manpages.ubuntu.com/manpages/jammy/en/man1/ssh.1.html) client | **not defined** |
105107
| `SSH_ALIVE_INTERVAL` | [ssh](https://manpages.ubuntu.com/manpages/jammy/en/man1/ssh.1.html) `ServerAliveInterval` setting. Don't set it in `SSH_OPTIONS` as this behavior is undefined. | 20 |

0 commit comments

Comments
 (0)