Containers are lightweight prebuilt environments that are easy to distribute and deploy. HammerDB v6.0 includes both a pre-built Docker image and a Dockerfile that can be used to create HammerDB Docker containers. This container is based on an Ubuntu 24.04 base image and provides a ready-to-use environment to run HammerDB. HammerDB has a dependency on third-party driver libraries to connect to the target databases. This Docker container installs the required client libraries and sets up the environment that enables connections to the target databases.
A pre-built Docker image is provided on the official TPC site on Docker Hub at https://hub.docker.com/u/tpcorg that can be downloaded with the docker pull command either for a complete image for all databases but also database-specific images.
docker pull tpcorg/hammerdb docker pull tpcorg/hammerdb:mysql docker pull tpcorg/hammerdb:maria docker pull tpcorg/hammerdb:oracle docker pull tpcorg/hammerdb:postgres docker pull tpcorg/hammerdb:mssqls
The official HammerDB Docker images are hosted by the TPC-Council.
It is only necessary to follow the Dockerfile build instructions if you wish to build your own Docker images from source.
A Dockerfile is a shell script that automates the docker container build. It makes it easier to spawn multiple containers with ease. HammerDB source on GitHub is packaged with a folder “Docker”, that contains all the Docker related files and folders. This folder contains a Dockerfile for building a HammerDB client container that supports all the databases that HammerDB supports, i.e. Oracle, Microsoft SQL Server, IBM Db2, MySQL, PostgreSQL and MariaDB. The Dockerfile is easy to customise for individual requirements.
The HammerDB Dockerfile is stored within the HammerDB GitHub repository. To download the Dockerfile either clone or download the ZIP file of the HammerDB source and navigate to the Docker directory.
The Docker container built from this Dockerfile installs the required third-party driver libraries for all databases supported in HammerDB except for IBM Db2. As IBM Db2 client libraries are not free to redistribute they must be independently downloaded and added if required. For the build to include IBM Db2, IBM Data Server Driver for ODBC and CLI can be downloaded locally and placed in the same location as Dockerfile.
To create an image: Change to the directory containing the Dockerfile and run the docker build command.
docker build -t hammerdb-v6.0 .
To create and start a container named "hammerdb" with the image built in the previous section, run the following command. The container build is successful, but the client libraries for IBM are not installed.
docker run -it --name hammerdb hammerdb-v6.0 bash
If IBM client libraries are manually downloaded and placed alongside the Dockerfile, the container builds successfully and the output looks as follows.