Running GoldenGate Installers within Docker containers on MacOS
Over the last few days, I’ve been trying to improve the speed at which I can setup and configure Oracle GoldenGate for testing purposes. What I settled on what setting up a Docker container to be a VM subsistute. Besides I’ve been playing with Docker, off and on, for over a year now; yet I’m finally investing the time to drive this forward.
One of the items I’ve been trying to solve is “how do I test the installers for Oracle GoldenGate”? In order to do this, I’ve had to figure out how to run an X11 interface from the Docker container. In order to do this, I’ve had to use the product XQuartz (download here).
Configure XQuartz
After you download the XQuartz software, you will need to enable the security setting “Allow connections from network clients”. This setting enables connections from remote applications, i.e. within the Docker container.
XQuartz -> Preferences
After setting the settings in XQuartz, restart the application. The restart will enable the settings. Then start XQuartz and minimize the window.
Prepare Docker
With te XQuartz running, now I can start using Docker to run the installers. The steps that I need to this are:
Start a Docker container:
When you start the Docker container, you will need to specify the DISPLAY port in the run command. Also notice that I’m using “docker.host.internal”.
docker run -dit –privileged –name oraogg -e DISPLAY=host.docker.internal:0 oraogg:18.1.0
Enable XHost from the OS:
Before you can bring the installer GUI up on my host display, I need to enable the host to allow the connection. This is simply enabling xhost for the localhost.
xhost + 127.0.0.1
Set DISPLAY within the Docker Container:
With the Docker container running, I can now access the container and specify the DISPLAY variable. Also notice that I’m using “docker.host.internal” inside of the Docker container.
docker exec -it oraogg /bin/bash
su – oracle
export DISPLAY=host.docker.internal:0
Run the Installer:
Now I’m ready to start the Oracle GoldenGate Installer(s). I navigate to the $OGG_HOME/bin and run the Oracle GoldenGate Configuration Assistant (OGGCA).
At this point, I can use xQuartz to provide the GUI interface for items I want to install within a Docker container.
Enjoy!!
Current Oracle Certs
Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.
Your article helped me a lot, is there any more related content? Thanks!