joseluisq/cubesql

By joseluisq

Updated over 2 years ago

A Linux Docker image for the cubeSQL server.

Image
Databases & Storage

290

Docker cubeSQL develDocker Image Version (tag latest semver)Docker Image Size (tag)Docker Image

A Linux Docker image for the cubeSQL server.
Note: This is not an official Docker image.

It provides the cubeSQL server using latest Debian 11-slim (Bullseye).

→ View source code on Github.

cubeSQL License/Registration

You will need to register cubeSQL server.

  1. Request a key from sqlabs website.
  2. Download cubeSQL Admin, connect to cubeSQL and register your server.

Note: The default server port is 4430

Usage

Run a container

docker run --rm -it joseluisq/cubesql:latest

Or run the server using Docker Compose

docker-compose -f docker-compose.sample.yml up
# [+] Running 1/1
# Container docker-cubesql_cubesql-server_1  Recreated
# Attaching to cubesql-server_1
# cubesql-server_1  | CubeSQL Server version 5.8.0 64bit mode, Build Date Sep 26 2020 (SQLite Engine 3.33.0), TSL Library is LibreSSL 3.1.4
# cubesql-server_1  |

Or extend this image using your own Dockerfile

FROM joseluisq/cubesql:latest
# ....

Environment variables

The image provides the following environment variables for setup with the following default values.

  • CUBESQL_PORT: 4430
  • CUBESQL_DATA: /data
  • CUBESQL_SETTINGS: /data/cubesql.settings

You can see the all cubeSQL options typing:

docker run --rm -it joseluisq/cubesql:latest cubesql -h
# usage: cubesql [options]
# Available options are:
#   -h                      print usage and exit
#   -y                      print version and exit
#   -z                      do not load disabled logins table
#   -q                      enable SSL only connections mode
#   -t nthreads             set default startup working threads
#   -o ndatabases           set max number of shared databases
#   -l backlog              backlog size to be specified in the listen function
#   -p server_port          server port
#   -i ip_address           ip address used to bind
#   -f log_format           log format, values can be TEXT, SQLITE and CONSOLE
#   -v log_verbosity        log verbosity, values can be NONE, SQL_ERRORS or SQL_COMMANDS
#   -g debug_mode           debug mode, values can be NONE, FILE, CONSOLE, SYSTEM
#   -d db_path              full path to databases folder
#   -r restore_path         full path to restore folder
#   -b backup_path          full path to backup folder
#   -n manual_backup_path   full path to manual backup folder
#   -w ssl_crypto_path      full path to ssl and crypto libraries (in the form "ssl_libpath|crypto_libpath")
#   -u upload_path          full path to upload folder
#   -s settings_file        full path to settings file
#   -c config_file          full path to JSON startup config file
#   -e log_file             full path to log file
#   -x data_path            full path to the main data folder used by the server
#   -m ssl_certificate      full path to the SSL cerfificate file
#   -a ca_root_certificate  full path to the SSL CA root certiticate to enable client peer verification

Enable SSL only connections mode

First set up the cubesql server using CUBESQL_SSL_ONLY=true environment variable in order to accept only SSL connections.

Then on client side, for example cubeSQL Admin to connect to the server make sure to use encryption SSL.

image

For more details take a look at How to create a SSL certificate for localhost

Docker Pull Command

docker pull joseluisq/cubesql