Sign inSign up

griddb/griddb

By griddb

Updated about 2 years ago

GridDB is an open source time series database optimized for IoT and Big Data.

Image
2

100K+

griddb/griddb repository overview

What is GridDB?

GridDB is Database for IoT with both NoSQL interface and SQL Interface. Please refer to GridDB Features Reference for functionality. This repository includes server and Java client. And jdbc repository includes JDBC Driver.

How to use this image

Start a GridDB server instance

Starting a GridDB instance is simple.

Run images griddb sever default mode and default setting

$ docker run --network="host" griddb/griddb

All variable of docker GridDB

VariableValue defaultType of variable
GRIDDB_CLUSTER_NAMEdockerGridDBSTRING
GRIDDB_PASSWORDadminSTRING
NOTIFICATION_PORT31999NUMBER
NOTIFICATION_ADDRESS239.0.0.1STRING
NOTIFICATION_MEMBERNULLNUMBER

All method of docker GridDB

MODESTATUS(default)
MULTICASTON
FIXED LISTOFF

About run GridDB with connection method

GridDB run with Multicast mode

Run images GridDB server simple with multicast mode

$ docker run --network="host" griddb/griddb

Run image GridDB server with environment config for multicast mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e GRIDDB_PASSWORD=<passwd> \
    -e NOTIFICATION_PORT=<port> \
    -e NOTIFICATION_ADDRESS=<multicast_address> \
    griddb/griddb

Start docker GridDB via docker-compose

Example docker-compose.yaml for GridDB:

version: '3'

services:
  griddb:
    container_name: griddb_server
    image: griddb/griddb
    network_mode: "host"
    volumes:
      - "vol:/var/lib/gridstore"

volumes:
    vol:

Try command line in current folder :

$ docker-compose up
GridDB run with fixed list mode

Run images GridDB server simple with fixed list mode

$ docker run --network="host" -e NOTIFICATION_MEMBER=1 griddb/griddb

Run image GridDB server with environment config for fixed list mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e GRIDDB_PASSWORD=<passwd> \
    -e NOTIFICATION_MEMBER=1 \
    griddb/griddb

Note :

  • GridDB CE of the version since 4.5 supports only 1 member for fixed list method.
  • GridDB use option --network="host" to forward ports.

Execute a sample program (GriddB server on Ubuntu)

Run sample Client (Java)

$ docker run -d --network="host" griddb/griddb
$ docker run --network="host" griddb/java-client

Output:

--> Person:  name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]

The more information about griddb server and java client. Could please refer to here

Run sample JDBC Driver

$ docker run -d --network="host" griddb/griddb
$ docker run --network="host" griddb/jdbc

Output :

--> SQL Create Table name=SampleJDBC_Select
    SQL Insert count=5
    SQL row(id=3, value=test3)
    SQL row(id=4, value=test4)
    success!

The more information about JDBC Driver. Could please refer to here

Container shell access

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your GridDB container:

$ docker exec -it container-name bash

Check status container for griddb sever:

$ docker exec container_name /bin/bash -c "gs_stat -u admin/admin"

The log is available through Docker's container log:

$ docker logs container_name

About data from volume

$ docker run --name container_name \
  -v my_vol:/var/lib/gridstore \
  griddb/griddb

With: my_vol is volume ( $ docker volume ls ) Or you can see more infor in path: "/var/lib/docker/volumes/my_vol/_data"

Stop a GridDB server

Use docker exec for stop griddb sever:

$ docker exec container_name /bin/bash -c "gs_stopcluster -u admin/admin"
$ docker exec container_name /bin/bash -c "gs_stopnode -u admin/admin"
$ docker container stop container_name
or
$ docker kill container_name

Note: You can restart griddb server and you can add flag "-i" into command for more information. Using command in below:

$ docker container start container_name -i

Image Variants

The griddb images come in many flavors, each designed for a specific use case.

griddb/griddb

  • This is default image of GridDB server.

griddb/griddb:<version>-jammy

  • This is image of GridDB server on Ubuntu. This image dedicated of GridDB server on Ubuntu 22.04.

griddb/griddb:<version>-focal

  • This is image of GridDB server on Ubuntu. This image dedicated of GridDB server on Ubuntu 20.04.

griddb/griddb:<version>-centos7

  • This is image of GridDB server on CentOS. This image dedicated of GridDB server on CentOS 7.

griddb/griddb:<version>-rockylinux9

  • This is image of GridDB server on RockyLinux. This image dedicated of GridDB server on RockyLinux 9.

License

View license information for the software contained in this image.

Tag summary

Content type

Image

Digest

sha256:8807b3944

Size

55.7 MB

Last updated

about 2 years ago

docker pull griddb/griddb