Docker, Oracle

Run SQLd360 in Docker Container

A few weeks ago, I needed to run SQLd360, but didn’t have access to the database server, and I was working from a Windows box. That combination is not the best. Normally, I would have used VirtualBox with a Linux OS and handled things from there. This time I decided to see what could be done with Docker.

In a few simple steps, I was up an running, so let’s get to it shall we?

Configure SQLd360 in Docker
  1. Download SQLd360 from the github repository. This .zip file will need to be on your local machine.
  2. Create the following Dockerfile in the same directory as the SQLd360-master.zip

Before building the image, take note that this Dockerfile uses the Oracle Database Instant Client from the Docker Store. You will need to create an account to access these images.

Build the Docker image
  1. Build the Docker image: docker build -t <username>/<image> .

Here is an example of what I did.

Docker will now build the image and install a number of packages and add and unzip the SQLd360-Master.zip file.

Deploy Docker image and run SQLd360
  1. Deploy the image to a container and run sh
  2. Connect to the database
  3. Run sqld360

From here, just let sqld360 run.  You will see two errors at the end related to tkprof. This is because tkprof is trying to run from the database server and since we are on a remote machine, that file is not available to the Docker image.

Hopefully this will give you another option to run SQLd360. As always, you can find all the code for this post on my github repo.

 

Enjoy!dbaontap


Also published on Medium.