Docker Images - BangDB = NoSQL + AI + Stream

Docker Images


BangDB Docker Images

The docker images are available publicly for use. it's available at docker hub
There are two ways in which images are created. One, where we have standalone services for different images for different components of the BangDB. Second - single image for BangDB and all other components in an interactive mode.

For test purposes, we should use single image as it allows us to access shell and then we can use it as separate virtual machine.

For running different standalone services, we should use the independent docker images for different services

There are two ways to run the BangDB in docker;

1. BangDB Server - Docker images for Server, cli etc. all separate containers, good when we need to run standalone server
2. Single Docker image which will allow user to deal with BangDB interactively [ useful for test only ]

Option 1.

Run BangDB Server as standalone service [ recommended ]
A. Run the BangDB Server docker run -it -d bangdb/bangdb-service-2 OR docker run -it --memory="3g" --memory-swap="4g" --cpus="3" -p -d bangdb/bangdb-service-2 This will start the container and run the bangdb. To stop the container/server, docker stop To get CONTAINER_ID, docker ps -a see the id associated with the running image bangdb-server and use it to stop the server
Now we have server running, but we still need cli to interact. It can be done again using another docker image for cli
B. Run the cli docker run -it bangdb/bangdb-cli:bangdb-cli
This will run the cli and you can interact with database. Please see for overview of the cli and how to use it
It is recommended to user to use the above method to run BangDB. Next section is for test purposes only, you may skip if you are not going to run it for test

Option 2. For Single Image [ useful as user can use it like linux box ]

A. Run the docker [ bangdb_ubuntu18 ] docker run -it bangdb/bangdb:bangdb-server OR, if you wish to add memory and cpu numbers docker run --memory="6g" --cpus="4" -it bangdb/bangdb:bangdb-server it will offer shel and user can get in and interact with db using cli etc. User can also run benchmarks, run agent to push data etc. run bangdb server > ./bangdb-server start then go to cli folder and run cli to interact with db, or run tests as mentioned in readme > cd cli ./bangdb-cli-2.0 to stop the server, simply go to bangdb2 folder and run ./bangdb-server stop B. Stop the docker docker stop To get CONTAINER_ID, docker ps -a see the id associated with the running image bangdb-server and use it to stop the server
Note: the cpus, memory etc could be changed as required.

BangDB - Get Started with Docker image of the db [ option 2, above ]

Install BangDB

BangDB could be downloaded from
Please see more info on this at

Or we could use the docker image to run and test the db. We should take single docker image (bangdb/bangdb:bangdb-server) from

Note: there are separate images available for BangDB as well which runs individual components of the DB in separate docker containers, however for detail hands on, we should use the single image
To use docker images, pls see
Pull BangDB image

> docker pull bangdb/bangdb:bangdb-server

Note: you should have docker installed on the machine

Run the docker image

> docker run  -it bangdb/bangdb:bangdb-server

This will run the docker and provide a prompt like following;


Check the files and folders

root@e2c2eea35787:/bangdb2# ls -l
total 108
drwxrwxr-x 1 root root  4096 Jun 29 17:30 agent
-rwxrwxr-x 1 root root  4428 Jan 19 12:16 bangdb-server
-rw-r--r-- 1 root root 22750 Jun 30 20:42 bangdb.config
drwxrwxr-x 1 root root  4096 Jun 29 17:30 bangdb_udf
drwxrwxr-x 1 root root  4096 Jun 29 17:30 bin
drwxrwxr-x 1 root root  4096 Jun 29 17:30 cli
drwxrwxr-x 1 root root  4096 Jun 29 17:30 helpers
drwxrwxr-x 1 root root  4096 Jun 29 17:30 include
-rwxrwxr-x 1 root root 11490 Apr 19 11:59
drwxrwxr-x 1 root root  4096 Jun 29 17:30 jars
drwxrwxr-x 1 root root  4096 Jun 29 17:30 libs

Run the server

root@e2c2eea35787:/bangdb2# ./bangdb-server start
Updating the core-pattern file.. needs admin right for the same
Starting 'bangdb-server-2.0' : Running service in background now
server init done with [ 8 ] workers for server-stage-option 1

This runs the db in background. You can check the db logs using following command;

root@e2c2eea35787:/bangdb2# tail -f bin/data/mydb.applog 
[2021-06-30 21:17:48]:[bangdb_database.cpp:446][INF] table [ 4160012360353312583 : _sys_attr_stats_tbl ] created
[2021-06-30 21:17:48]:[bangdb_stats_manager.cpp:43][INF] successfully init bangdb_stats_manager for schema
[2021-06-30 21:17:48]:[bangdb_database.cpp:446][INF] table [ 418502132675317959 : _sys_entity_table_ ] created
[2021-06-30 21:17:48]:[bangdb_entity_manager.cpp:25][INF] successfully init bangdb_entity_manager for schema
[2021-06-30 21:17:48]:[bangdb_database.cpp:446][INF] table [ 487512192128988132 : _sys_stream_schema_ ] created
[2021-06-30 21:17:48]:[bangdb_database.cpp:446][INF] table [ 7241491142827284587 : _sys_schema_meta_ ] created
[2021-06-30 21:17:48]:[tableenv.cpp:394][ERR] incompatible key type [ 1 ] for primitive table, setting the key_type properly (NORMAL_KEY_LONG)
[2021-06-30 21:17:48]:[bangdb_database.cpp:446][INF] table [ 1743666775485222942 : _sys_stream_meta_ ] created
[2021-06-30 21:17:48]:[bangdb_wrapper.cpp:240][INF] Database auxiliary services also started : mydb
[2021-06-30 21:17:48]:[service.cpp:476][INF] master [, 10101] with public ip [ ] is up and running in {non-transaction} mode with {replication off} for database = mydb

Ctrl+c to stop watching the log.

Run the CLI

We need to interact with the db using cli, hence now we should run it

> cd cli
> ./bangdb-cli-2.0
This will present a prompt and we can start the db operations


Please see for detail CLI commands and operations