Applies to: QLM Enterprise
Version: 16.0.22152.2
Overview
If you run your application within a docker container, QLM can bind the license to the hostname of the docker container.
Configuration
There are two ways you can configure QLM to bind the license to a Docker Container:
- By setting the ELicenseBinding to QlmUniqueSystemIdentifier2
- By setting the ELicenseBinding to DockerContainer
Detection
To detect that your application is running in a Docker Container, QLM relies on the following environment variable: QLM_RUNNING_IN_DOCKER_CONTAINER
Therefore, when you create your Docker container image, you must set the QLM_RUNNING_IN_DOCKER_CONTAINER environment variable to True.
Example of a Dockerfile used to create an image:
FROM mcr.microsoft.com/dotnet/framework/runtime
WORKDIR /app
ENV QLM_RUNNING_IN_DOCKER_CONTAINER=true
COPY ./publish .
ENTRYPOINT ["/app/QlmCSharpConsoleAppSample.exe"]
The following API is also available to detect if your application is running in a Docker Container (requires that your image sets the QLM_RUNNING_IN_DOCKER_CONTAINER environment variable): QlmHardware.RunningInDockerContainer()
Example:
QlmHardware hw = new QlmHardware();
bool isRunningInDockerContainer = hw.RunningInDockerContainer ();
Comments
0 comments
Article is closed for comments.