SingleStore Dockerized

Example of setting up SingleStore with Docker the hard way.

NOTE: You probably want to use the official image

Setup

Create keys:

ssh-keygen -f keys/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f keys/ssh_host_dsa_key -N '' -t dsa

Setup env

Copy the example .env:

cp .env.example .env

Setup environment variables:

  • SDB_LICENSE: The license of you SingleStore installation. This is available in the SingleStore Portal.
  • SDB_PASSWORD: The password for the instance.

Start

Start the Docker container with docker compose:

docker compose up

SSH

To log in to the container:

docker compose exec db bash

Connect to DB

From within the container:

singlestore -h localhost -P 3306 -u root -p$SDB_PASSWORD

From the host machine:

mysql -h 127.0.0.1 \
  -P 3306 \
  -u root \
  --password=<your-password> \
  --prompt="singlestore> "

Deployment

This can be deployed anywhere Docker is supported.

For example, it works great on Railway.

Just make sure to open port 3306.

On Railway, the port can be exposed via the TCP Port Proxy.

License

MIT