Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Last active April 30, 2024 17:17
Show Gist options
  • Save hoangdh/ed45d2c350a28ed3814e4f08d5fffe71 to your computer and use it in GitHub Desktop.
Save hoangdh/ed45d2c350a28ed3814e4f08d5fffe71 to your computer and use it in GitHub Desktop.
Dockerfile - KMS Emulator Server on Linux (vlmcsd & PyKMS)
FROM alpine:3.9
MAINTAINER hoangdh <github.com/hoangdh>
ENV LIB python3-tkinter python3-dev sqlite-dev
ENV DEP build-base git py-pip
RUN apk update \
&& apk add --no-cache $LIB $DEP \
&& git clone https://github.com/SystemRage/py-kms /tmp/py-kms \
&& mv /tmp/py-kms/py-kms /opt/ \
&& pip install --no-cache-dir tzlocal pysqlite3 \
&& apk del $DEP; rm -rf /tmp/*
EXPOSE 1688
CMD python3 /opt/py-kms/pykms_Server.py --logsize 1 -w RANDOM
FROM alpine:3.9
MAINTAINER hoangdh <github.com/hoangdh>
RUN apk add --no-cache build-base git \
&& git clone https://github.com/Wind4/vlmcsd /tmp/vlmcsd \
&& cd /tmp/vlmcsd \
&& make \
&& mv /tmp/vlmcsd/bin/vlmcsd /usr/sbin/vlmcsd \
&& cd / && rm -rf /tmp/* \
&& apk del build-base git
EXPOSE 1688
CMD /usr/sbin/vlmcsd -D -p /var/run/kmsd.pid -l /dev/stdout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment