solidDB Help : Best Practices : Running a solidDB server on Linux in a Docker container
  
Running a solidDB server on Linux in a Docker container
Use the following guidelines to run a solidDB server on a Linux image in a Docker container.
You should not expect any significant performance impact as a result of running a solidDB server in a Docker container as long as the solidDB server has local persistent database storage and is accessed by using TCP port mapping.
Date: 2021-06-23
Scope: The guidelines apply to solidDB version 200.0.0.628, Docker version 1.13.1, CentOS version 7, but might not be applicable for other versions.
Selecting a base image
Select an image that includes the Linux glibc functions, for example:
Ubuntu, see hub.docker.com/_/ubuntu
Centos, see hub.docker.com/_/centos
Alpine GNU C, see github.com/Docker-Hub-frolvlad/docker-alpine-glibc
The functions are not available in all basic Linux images, including alpine.
Note solidDB server images have not been provided for Docker Hub. If your setup requires that Docker images must be available in a repository (for example, if you run containers in Kubernetes), you must install and configure your own repository and then create your own images that contain the solidDB server code.
Starting and stopping a solidDB server
To start a solidDB server inside a container, you must include the following files in the container:
solid
solid.ini
solid.lic (solidDB license file)
To ensure the correct server shutdown sequence when a container is stopped, start the solidDB server by running a command with the following structure:
CMD ["/usr/local/bin/solid", "-f", "-c/usr/local/lib/solid"]
You include the -f option so that the server runs in the foreground and prints log messages directly to the container console.
Stop the solidDB server by using one of the following methods:
Run the solidDB ADMIN COMMAND 'shutdown' command over a TCP connection to the solidDB server.
Send the following signal to the container:
docker kill --signal=SIGTERM soliddb
Implementing database persistence
To run solidDB in a container, you must usually have the database and log files in persistent storage. On Linux, the following Docker run command option mounts the host system directory inside the container file system:
-v /var/db/dbdir:/var/lib/solid
Accessing the server over a TCP connection
You can use the Docker standard port mapping mechanism to make a solidDB server (that runs inside a container) accessible to applications that run outside the container. For example, use the following Docker run command option to map the host system TCP port 2964 to a port 1964 in the container where the server is listening for client connections.
-p 2964:1964
Note A solidDB server that runs inside a container is only accessible by using a TCP connection. Other methods, such as unix domain socket (upipe) or Shared Memory Access (SMA) cannot be used to connect to the server from outside the container.
Go up to
Best Practices