solidDB Help : Best Practices : Running a solidDB server on Windows in a Docker container
  
Running a solidDB server on Windows in a Docker container
Use the following guidelines to run a solidDB server on a Windows 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, Microsoft Windows 10 Pro, but might not be applicable for other versions.
Selecting a base image
Select a Nano Server image that matches the host operating system, see hub.docker.com/_/microsoft-windows-nanoserver.
Nano Server containers must be run on a Windows host and Docker must be set to run Windows containers instead of WSL containers. For details, see docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/run-your-first-container
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.
Getting started
Complete the following steps to configure the base solidDB image:
1 Create a Dockerfile that contains the following code:
FROM mcr.microsoft.com/windows/nanoserver:20H2
ADD solidbin solidbin
CMD ["solidbin\\solid", "-c", "dbdir"]
2 At the command prompt, run the following commands to create a persistent storage directory (C:\dbdir) that contains the solidDB binary and the solidDB license file.
mkdir solidbin
copy
solid-directory\bin\solid.exe solidbin
mkdir C:\dbdir
copy
solid-directory\solid.lic C:\dbdir
3 At the command prompt, run the following command to create a database in the persistent storage directory:
solidbin\solid -c C:\dbdir -x exit -U username -P password -C catalog
Note To run solidDB in a container, you must usually have the database and log files in persistent storage.
4 At the command prompt, run the following command to create a Docker image called solidserver:
docker build -t solidserver .
5 At the command prompt, run the following command to run the image, mount the local C:\dbdir in the container as C:\dbdir, and open local port 2964 for solidDB connections:
docker run -v C:\dbdir:C:\dbdir -p 2964:1964 solidserver
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.
Stopping a solidDB server
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
Go up to
Best Practices