iquery
Browser based DB query tool that doesn't require any client drivers to be installed.
Current supported DB drivers are: DB2-iSeries, DB2-Community Edition, MSSQL, MySQL, Postgres, and SQLite.
Installation
- Install Docker
- Download Image
- Configuration
- Run
Install Docker
Download, and run, the installer for your platform:
Download Image
Pull the image from Docker Hub.
% docker pull minty/iquery
Configuration
Create a script to start a container from the above image.
The script should hold all the databases you'd like to be able to execute queries against, along with port mapping, theme, and a placeholder query.
The format of the database entries are:
DB_X=NAME|DB_TYPE|HOSTNAME|PORT|DATABASE|USERNAME|PASSWORD
eg.
#!/bin/bash
docker run \
-it \
-e "DB_1= Users| db2-i | users.db.com | 446 | users | maverick homolka |L0v{s@pplE" \
-e "DB_1= Users| db2-ce | forms.db.com | 50000 | forms | maverick homolka |L0v{s@pplE" \
-e "DB_3=Credit Card | mssql | cc.db.com | 1433 | cc | maverick homolka |L0v{s@pplE" \
-e "DB_3= Customers | mysql | customers.db.com | 3306 | customers | maverick homolka |L0v{s@pplE" \
-e "DB_4= Buildings | postgres | buildings.db.com | 5432 | buildings | maverick homolka |L0v{s@pplE" \
-e "DB_5= Cars | sqlite3| | | /db/test.db | |" \
-e "THEME=vs-dark" \
-e "PLACEHOLDER=SELECT * FROM SCHEMA.TABLE;" \
-v "$HOME/tmp/db/:/db/" \
-p 7777:8080 \
--rm \
minty/iquery
Run
- Execute the script created during the Configuration step
- Open your browser, and navigate to http://localhost:7777
cmd
+<enter>
, or ctrl
+<enter>
will execute the query
Building
- Start Container
./bin/dockit.sh
- Build the Binary
(You'll also need to pull 3rd party libs. This can be done with ./bin/goget.sh
)
./bin/build.sh
- Create Image
docker build -t minty/iquery .
To debug/test you can modify the ./bin/run.sh
script with valid database settings
and execute it after step 1. This will start the service and allow you to test through http://localhost:7777.
Notes
Changes have been made to the package: bitbucket.org/phiggins/db2cli
to fix a few issues, (mainly DB2 time
types)