Skip to content

Commit

Permalink
Hdb docker (#401)
Browse files Browse the repository at this point in the history
* Updated HammerDB version from 4.4 to 4.5

* Update Readme
  • Loading branch information
pooja-jain-17 committed Aug 9, 2022
1 parent be9e508 commit 3c0f687
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ RUN apt install -y libpq-dev
# Install and configuring MySQL client libraries
RUN apt install -y libmysqlclient21

# Install configure HammerDB-v4.4
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.4/HammerDB-4.4-Linux.tar.gz && \
tar -xvzf HammerDB-4.4-Linux.tar.gz && ls && \
# Install configure HammerDB-v4.5
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.5/HammerDB-4.5-Linux.tar.gz && \
tar -xvzf HammerDB-4.5-Linux.tar.gz && ls && \
echo 'export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH' >> ~/.bashrc && \
rm -rf *.tar.gz *.zip unixODBC-2.3.9
WORKDIR /home/hammerdb/HammerDB-4.4
WORKDIR /home/hammerdb/HammerDB-4.5

# Adding some sample scripts to be used with HammerDB command line interface
ADD sample_scripts /home/hammerdb/HammerDB-4.4/sample_scripts
ADD sample_scripts /home/hammerdb/HammerDB-4.5/sample_scripts

CMD "bash"

#To create an image: Go to the folder containing the Dockerfile
# docker build -t hammerdb-v4.4 .
# docker build -t hammerdb-v4.5 .
#To start a container with that image
# docker run -it -name hammerdb hammerdb-v4.4 bash
# docker run -it -name hammerdb hammerdb-v4.5 bash
10 changes: 5 additions & 5 deletions Docker/Readme
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

This folder provides a Dockerfile for building a HammerDb-v4.4 client container that supports all the databases HammerDB is enabled for, i.e. Oracle, Microsoft SQL Server, IBM Db2, MySQL, PostgreSQL and MariaDB. However for enabling client libraries for IBM Db2, you will need to download the client libraries from IBM web portal. For seamless build from Dockerfile, you can place the downloaded IBM Db2 client libraries, "odbc_cli" alongside Dockerfile in the same folder where you plan to build the HammerD container. For someone who doesn't need IBM DB2 client, they can create a empty folder as "odbc_cli".
This folder provides a Dockerfile for building a HammerDb-v4.5 client container that supports all the databases HammerDB is enabled for, i.e. Oracle, Microsoft SQL Server, IBM Db2, MySQL, PostgreSQL and MariaDB. However for enabling client libraries for IBM Db2, you will need to download the client libraries from IBM web portal. For seamless build from Dockerfile, you can place the downloaded IBM Db2 client libraries, "odbc_cli" alongside Dockerfile in the same folder where you plan to build the HammerD container. For someone who doesn't need IBM DB2 client, they can create a empty folder as "odbc_cli".

To create an image: Go to the folder containing the Dockerfile
docker build -t hammerdb-v4.4 .
docker build -t hammerdb-v4.5 .

To start a container named "hammerdb" with the image, "hammerdb-v4.4" built from from Dockerfile
docker run -it --name hammerdb hammerdb-v4.4 bash
To start a container named "hammerdb" with the image, "hammerdb-v4.5" built from from Dockerfile
docker run -it --name hammerdb hammerdb-v4.5 bash

You will need to add networking to communicate with a remote database when starting the container
For example, adding host network to the container.
docker run --network=host -it --name hammerdb hammerdb-v4.4 bash
docker run --network=host -it --name hammerdb hammerdb-v4.5 bash

0 comments on commit 3c0f687

Please sign in to comment.