diff --git a/Dockerfile b/Dockerfile index a6c4fdb..1488954 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,14 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* +# Give IBC more time to detect the login/config dialog on the current headless +# GCE target. The upstream 60s default has been too short during keepalive +# recovery and caused intermittent exit code 1112 before the Gateway became +# API-ready. +RUN sed -i 's/^LoginDialogDisplayTimeout=60$/LoginDialogDisplayTimeout=180/' \ + /home/ibgateway/ibc/config.ini \ + /home/ibgateway/ibc/config.ini.tmpl + COPY --chown=1000:1000 ./container_overrides/run.sh /home/ibgateway/scripts/run.sh RUN chmod a+x /home/ibgateway/scripts/run.sh diff --git a/README.md b/README.md index 6f36017..342d0de 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,11 @@ This repository also overrides the upstream headless startup script so Gateway r upstream `16bpp` display frequently led to black VNC output and intermittent IBC window detection failures before login completed. +The image also raises `LoginDialogDisplayTimeout` from `60` to `180` seconds in both +`/home/ibgateway/ibc/config.ini` and `config.ini.tmpl`. Keepalive recovery on the current +GCE target has occasionally needed longer than the upstream default before IBC can detect +the login/config dialog and drive Gateway back to an API-ready state. + For direct `docker compose` usage outside GitHub Actions, `ACCEPT_API_FROM_IP` must still be set explicitly in `.env`; there is no longer a silent default CIDR. These GitHub secrets are specific to this repository's deployment flow. They are not intended to be global secrets shared by every quant repository. diff --git a/tests/test_docker_compose_ports.sh b/tests/test_docker_compose_ports.sh index 16fddd1..44d7b2e 100644 --- a/tests/test_docker_compose_ports.sh +++ b/tests/test_docker_compose_ports.sh @@ -8,6 +8,8 @@ run_override="$repo_dir/container_overrides/run.sh" grep -Fq 'pip3 install pyotp ib_insync --break-system-packages' "$dockerfile" grep -Fq 'FROM gnzsnz/ib-gateway:10.37.1q' "$dockerfile" +grep -Fq "LoginDialogDisplayTimeout=60$/LoginDialogDisplayTimeout=180" "$dockerfile" +grep -Fq '/home/ibgateway/ibc/config.ini.tmpl' "$dockerfile" grep -Fq 'COPY --chown=1000:1000 ./container_overrides/run.sh /home/ibgateway/scripts/run.sh' "$dockerfile" grep -Fq 'chmod a+x /home/ibgateway/scripts/run.sh' "$dockerfile" grep -Fq 'libgtk-3-0' "$dockerfile"