-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add Official GridDB Image #9283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Sorry for the delay 🙇 I think the biggest issue I see here is the |
|
Thank you so much for your comment. |
Diff for fb18acb:diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..95f8e2b 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,6 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Katsuhiko Nonomura <[email protected]> (@knonomura)
+GitRepo: https://github.com/griddb/griddb-docker.git
+
+Tags: latest, 4.5.2-bionic
+GitCommit: fc29e77474c69ccd3ff989b48eb745f9a3bb4808
+Directory: griddb/4.5/bionic
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..95c47a2 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,2 @@
+griddb:4.5.2-bionic
+griddb:latest
diff --git a/griddb_4.5.2-bionic/Dockerfile b/griddb_4.5.2-bionic/Dockerfile
new file mode 100644
index 0000000..928f2da
--- /dev/null
+++ b/griddb_4.5.2-bionic/Dockerfile
@@ -0,0 +1,32 @@
+FROM ubuntu:18.04
+
+# You can download griddb V4.5.2 directly at https://github.com/griddb/griddb/releases/tag/v4.5.2
+ENV GRIDDB_VERSION=4.5.2
+ENV GRIDDB_DOWNLOAD_SHA512=92d0e382c8d694c2b37274fa37785e2bdb9d6ad8aee0f559e75a528ad171aea1221091ca24db5e2f90442fd92042a6307198d74d0eb1b5f9a23659a26ca7b609
+ENV GS_HOME=/var/lib/gridstore
+ENV GS_LOG=/var/lib/gridstore/log
+ENV PORTS=10001
+
+# Install griddb server
+RUN set -eux \
+ && apt-get update \
+# Install dependency for griddb
+ && apt-get install -y dpkg python wget \
+ && apt-get clean all \
+# Download package griddb server
+ && wget -q https://github.com/griddb/griddb/releases/download/v${GRIDDB_VERSION}/griddb_${GRIDDB_VERSION}_amd64.deb \
+# Check sha512sum package
+ && echo "$GRIDDB_DOWNLOAD_SHA512 griddb_${GRIDDB_VERSION}_amd64.deb" | sha512sum --strict --check \
+# Install package griddb server
+ && dpkg -i griddb_${GRIDDB_VERSION}_amd64.deb \
+# Remove package
+ && rm griddb_${GRIDDB_VERSION}_amd64.deb
+
+VOLUME /var/lib/gridstore
+
+# Config file for griddb
+COPY start-griddb.sh /
+USER gsadm
+ENTRYPOINT ["/bin/bash", "/start-griddb.sh"]
+EXPOSE $PORTS
+CMD ["griddb"]
diff --git a/griddb_4.5.2-bionic/start-griddb.sh b/griddb_4.5.2-bionic/start-griddb.sh
new file mode 100644
index 0000000..338b5fe
--- /dev/null
+++ b/griddb_4.5.2-bionic/start-griddb.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+if [ "${1:0:1}" = '-' ]; then
+ set -- griddb "$@"
+fi
+
+# Save variable and value to config file
+save_config() {
+ echo "GRIDDB_CLUSTER_NAME=\"$GRIDDB_CLUSTER_NAME\"" >> /var/lib/gridstore/conf/gridstore.conf
+ echo "GRIDDB_USERNAME=\"$GRIDDB_USERNAME\"" >> /var/lib/gridstore/conf/gridstore.conf
+ echo "GRIDDB_PASSWORD=\"$GRIDDB_PASSWORD\"" >> /var/lib/gridstore/conf/gridstore.conf
+}
+
+# First parameter after run images
+if [ "${1}" = 'griddb' ]; then
+
+ isSystemInitialized=0
+ if [ "$(ls -A /var/lib/gridstore/data)" ]; then
+ isSystemInitialized=1
+ fi
+
+ if [ $isSystemInitialized = 0 ]; then
+ export GRIDDB_CLUSTER_NAME=${GRIDDB_CLUSTER_NAME:-"dockerGridDB"}
+ export GRIDDB_USERNAME=${GRIDDB_USERNAME:-"admin"}
+ export GRIDDB_PASSWORD=${GRIDDB_PASSWORD:-"admin"}
+
+ # Extra modification based on environment variable
+ gs_passwd $GRIDDB_USERNAME -p $GRIDDB_PASSWORD
+ sed -i -e s/\"clusterName\":\"\"/\"clusterName\":\"$GRIDDB_CLUSTER_NAME\"/g \/var/lib/gridstore/conf/gs_cluster.json
+
+ # MULTICAST mode
+ if [ ! -z $NOTIFICATION_ADDRESS ]; then
+ echo "MULTICAST mode address"
+ sed -i -e s/\"notificationAddress\":\"239.0.0.1\"/\"notificationAddress\":\"$NOTIFICATION_ADDRESS\"/g \/var/lib/gridstore/conf/gs_cluster.json
+ fi
+
+ if [ ! -z $NOTIFICATION_PORT ]; then
+ echo "MULTICAST mode port"
+ sed -i -e s/\"notificationPort\":31999/\"notificationPort\":$NOTIFICATION_PORT/g \/var/lib/gridstore/conf/gs_cluster.json
+ fi
+
+ # FIXED_LIST mode
+ if [ ! -z $NOTIFICATION_MEMBER ]; then
+ echo "FIXED_LIST mode, not suported"
+ exit 1
+ fi
+
+ # PROVIDER mode
+ if [ ! -z $NOTIFICATION_PROVIDER ]; then
+ echo "PROVIDER mode, not supported"
+ exit 1
+ fi
+
+ # Write to config file
+ save_config
+ fi
+
+ # Read config file
+ . /var/lib/gridstore/conf/gridstore.conf
+
+ # Start service
+ cd /var/lib/gridstore
+ sleep 5 && gs_joincluster -u $GRIDDB_USERNAME/$GRIDDB_PASSWORD -c $GRIDDB_CLUSTER_NAME -w &
+ gsserver --conf ./conf
+fi
+exec "$@"
+ |
|
Sorry for late update. I updated our entrypoint script to start GridDB process directly. |
Hello,
We would like to add an official image for our GridDB.
Checklist for Review
NOTE: This checklist is intended for the use of the Official Images maintainers both to track the status of your PR and to help inform you and others of where we're at. As such, please leave the "checking" of items to the repository maintainers. If there is a point below for which you would like to provide additional information or note completion, please do so by commenting on the PR. Thanks! (and thanks for staying patient with us ❤️)
foobarneeds Node.js, hasFROM node:...instead of grabbingnodevia other means been considered?)ifFROM scratch, tarballs only exist in a single commit within the associated history?