The IBGA Docker Image

Understanding the Concept of Images and Containers

If you are new to docker, images and containers, here is a primer on each concept. An image is a read-only template acting as the base files that make up a system. A container is a runnable instance of an image.

A container is a lot like an instance of virtual machine (VM), whereas an image is like the disk of the VM.

Docker is a set of software that implements OS-level virtualization technology to support running of containers based on images.

Obtaining the IBGA Image From Docker Hub

The IBGA docker image is located at https://hub.docker.com/r/heshiming/ibga. To obtain the image, use the following command:

$ sudo docker pull heshiming/ibga

However, if you plan to follow our Docker Compose flavored configuration, you don’t need this command to pull it. Docker Compose will pull it automatically when you launch the container.

Building the Image

Docker is required before building the IBGA image. Please refer to its official documentation for the details about installing.

Use the build.sh script to build the IBGA docker image on your own computer:

$ ./build.sh

You will need a bash shell, available on Linux, UNIX, and macOS to run this script. If you are using Windows, open up build.sh in a text editor, and paste the docker build command into a command prompt window.

Behind the Scene

IBGA is designed to be a “disposable container”, that is, important states and program files are not persisted inside the container. The container is loaded with just a set of bash scripts, X11 and VNC to support remote viewing, and the automation dependencies, namely JAuto and xdotool. Upgrading will be a piece of cake.

IBGA makes use of Xvfb (why not xserver-xorg-video-dummy?), and x11vnc to implement a headless X11 environment that is capable of both running a GUI application as well as allowing remote control.

IBGA employs a set of bash scripts to manage everything: from installation to daily restarts; from logins to option settings. The image itself does not come with a copy of IB Gateway. Instead, it downloads and installs from the web upon first start.

JAuto is a crucial piece in automation implementation. To click a button or fill in a text box, you need its coordinates and text. JAuto is capable of listing onscreen UI components and their attributes. Another critical piece is xdotool, which simulates keyboard and mouse actions with the coordinates supplied by JAuto.


Copyright © 2022 He Shiming <heshiming at gmail dot com>.