Starcounter has been published on DockerFebruary 20, 2018 1:00 pm Leave your thoughts
You can now run Starcounter inside a Docker container by using the image starcounter/starcounter-2.3.2-windows. The first release, tag
0.1.0, contains all the binaries from Starcounter version
126.96.36.1997 which may be downloaded at starcounter.io. The image itself uses
microsoft/windowsservercore as the base image and it may be run as a Windows Docker container.
The image does not contain the server repository by default because the end-user should be able to store the database transaction log files on the host which gives the possibility to use any third-party solution for backup and failover. Hence, the server repository may be added as a shared volume to any path inside the container and Starcounter will know where it is by setting the environment variable
StarcounterDataDir, see example below.
set REPO_PATH_HOST=C:/HostServerRepository set REPO_PATH_CONTAINER=C:/ContainerServerRepository docker run --volume %REPO_PATH_HOST%:%REPO_PATH_CONTAINER% ^ --env "StarcounterDataDir=%REPO_PATH_CONTAINER%/Personal" ^ starcounter/starcounter-2.3.2-windows
Why use it?
This gives the possibility to use more cloud-based solutions than before, but the real power comes when using it in a continuous integration system. Spin up a new container, create a new database with a known initial state and start to execute tests. In fact, why not start multiple containers and run tests in parallel, totally isolated from each other? Note that you should not use the same server repository from different containers at the same time as it may lead to corrupted database transaction log files.
Want to try it out?
Please visit our GitHub repository, Starcounter/Starcounter.Docker.Windows, for more information. It is the source code for generating
starcounter/starcounter-2.3.2-windows image which gives you the possibility to create your own container from scratch. This may be interesting for you if you want a specific version of Starcounter, add your own binaries or customize the setup with a minimal number of container layers to optimize the performance.
Categorised in: Uncategorized
This post was written by Urban Nydén