vlmcsd - portable open-source KMS Emulator in C.
Files are from third party programming effort, see https://forums.mydigitallife.net/threads/50234/ and https://github.com/Wind4/vlmcsd
No association.
You can download the source and compile, resulting in following binaries: vlmcs vlmcsd.
The following docker file should automate KMS server deployment (install required packages, download third party GitHub master branch program files, unzip, compile binaries and place in relevant file system area), running vlmcsd in a container instance with -D to run in foreground, hence run as pid 1.
Dockerfile also cleans up installation removing compile directory and downloaded zip from file system.
This could probably be improved further detecting changes in third party repo to trigger automatic docker build, but that seems a bit hard to do or requires further magic (third party web hooks??)
Therefore, automatic docker build will either be triggered manually (when I see third party developer has updated GitHub program version, and trigger manual build) or via docker file changes (less likely) in my linked repo.
While ENTRYPOINT is used, one could use CMD section to provide customised/different start parameters (override CMD parameters when starting container), remembering -D is required to run vlmcsd in foreground (or container will exit).
docker run -d -p 1688:1688/tcp --name kms-server gkuzet/kms
Explanation: start in daemon mode (-d), port translate (-p) external host port 1688 to container port 1688, with name (--name) kms-server.
docker exec -ti kms-server /bin/bash
Explanation: execute container interactive (-i) terminal (-t) session using bash (/bin/bash)
By default, without specifying further options, vlmcsd listens on all IPs (0.0.0.0) and TCP port 1688. This is done so deoployment is easier, not IP bound specific.
netstat -atun | grep 1688
tcp 0 0 0.0.0.0:1688 0.0.0.0:* LISTEN
As previously stated, one could override CMD parameters when starting a container (for example to only listen on specific IP and/or a different TCP port). See program man pages for all the options.
By default, log file is written at /var/log/vlmcsd.log
Man pages have been installed
man vlmcsd
man vlmcs
FROM ubuntu
MAINTAINER First Last "[email protected]"
RUN ["sh", "-c", "apt-get update && apt-get install -y \
wget \
unzip \
build-essential \
man-db \
"]
RUN ["sh", "-c", "wget https://github.com/Wind4/vlmcsd/archive/master.zip"]
RUN ["sh", "-c", "unzip master.zip"]
WORKDIR /vlmcsd-master
RUN ["sh", "-c", "make"]
WORKDIR /vlmcsd-master/bin
RUN ["sh", "-c", "cp * /usr/local/bin"]
WORKDIR /usr/local/share/man
RUN ["sh", "-c", "mkdir man1 man7 man8"]
WORKDIR /vlmcsd-master/man
RUN ["sh", "-c", "cp vlmcs.1 /usr/local/share/man/man1/"]
RUN ["sh", "-c", "cp vlmcsd.7 /usr/local/share/man/man7/"]
RUN ["sh", "-c", "cp vlmcsd.8 /usr/local/share/man/man8/"]
RUN ["sh", "-c", "mandb"]
WORKDIR /
RUN ["sh", "-c", "rm -rf /vlmcsd-master"]
RUN ["sh", "-c", "rm master.zip"]
ENTRYPOINT ["/usr/local/bin/vlmcsd", "-D"]
CMD ["-l", "/var/log/vlmcsd.log"]
EXPOSE 1688
Commands can be run as normal shell instead of array of commands. Unfortunately using shell line can cause issues, so its better to follow preferred exec version.
vlmcsd is
vlmcsd is not
Caveat emptor
Content type
Image
Digest
Size
149.8 MB
Last updated
about 9 years ago
docker pull gkuzet/kms