2019-03-29 14:46:17 +01:00
|
|
|
# Use Alpine Linux
|
|
|
|
FROM alpine:3.8
|
|
|
|
|
|
|
|
# Maintainer
|
|
|
|
#MAINTAINER Artur Petrov <artur@phpchain.ru>
|
|
|
|
|
|
|
|
# EN: Variables
|
|
|
|
# RU: Переменные
|
|
|
|
|
|
|
|
# EN: IP-address
|
|
|
|
# RU: IP-адрес
|
2020-07-08 22:45:44 +02:00
|
|
|
ENV IP ::
|
|
|
|
# The IP address to listen on. The default is "::" (all interfaces).
|
2019-03-29 14:46:17 +01:00
|
|
|
|
|
|
|
# EN: TCP-port
|
|
|
|
# RU: TCP-порт
|
|
|
|
ENV PORT 1688
|
|
|
|
# The network port to listen on. The default is "1688".
|
|
|
|
|
|
|
|
# EN: ePID
|
|
|
|
# RU: ePID
|
|
|
|
ENV EPID ""
|
|
|
|
# Use this flag to manually specify an ePID to use. If no ePID is specified, a random ePID will be generated.
|
|
|
|
|
|
|
|
# EN: lcid
|
|
|
|
# RU: lcid
|
|
|
|
ENV LCID 1033
|
|
|
|
# Use this flag to manually specify an LCID for use with randomly generated ePIDs. Default is 1033 (en-us).
|
|
|
|
|
|
|
|
# EN: the current client count
|
|
|
|
# RU: текущий счётчик запросов на активацию продуктов от Microsoft
|
|
|
|
ENV CLIENT_COUNT 26
|
|
|
|
# Use this flag to specify the current client count. Default is 26.
|
|
|
|
# A number >=25 is required to enable activation of client OSes; for server OSes and Office >=5.
|
|
|
|
|
|
|
|
# EN: the activation interval (in minutes)
|
|
|
|
# RU: интервал активации (в минутах)
|
|
|
|
ENV ACTIVATION_INTERVAL 120
|
|
|
|
# Use this flag to specify the activation interval (in minutes). Default is 120 minutes (2 hours).
|
|
|
|
|
|
|
|
# EN: the renewal interval (in minutes)
|
|
|
|
# RU: интервал обновления (в минутах)
|
|
|
|
ENV RENEWAL_INTERVAL 10080
|
|
|
|
# Use this flag to specify the renewal interval (in minutes). Default is 10080 minutes (7 days).
|
|
|
|
|
|
|
|
# EN: Use SQLITE
|
|
|
|
# RU: Использовать РСУБД SQLITE
|
|
|
|
ENV SQLITE false
|
|
|
|
# Use this flag to store request information from unique clients in an SQLite database.
|
|
|
|
|
|
|
|
# EN: hwid
|
|
|
|
# RU: hwid
|
2019-09-13 10:35:38 +02:00
|
|
|
ENV HWID "364F463A8863D35F"
|
|
|
|
# Use this flag to specify a HWID.
|
2019-03-29 14:46:17 +01:00
|
|
|
# The HWID must be an 16-character string of hex characters.
|
2019-09-13 10:35:38 +02:00
|
|
|
# The default is "364F463A8863D35F" or type "RANDOM" to auto generate the HWID.
|
2019-03-29 14:46:17 +01:00
|
|
|
|
|
|
|
# EN: log level ("CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG")
|
|
|
|
# RU: Уровень логирования ("CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG")
|
|
|
|
ENV LOGLEVEL ERROR
|
|
|
|
# Use this flag to set a Loglevel. The default is "ERROR".
|
|
|
|
|
|
|
|
# EN: log file
|
|
|
|
# RU: Лог-файл
|
2019-06-04 00:06:03 +02:00
|
|
|
ENV LOGFILE /var/log/pykms_logserver.log
|
|
|
|
# Use this flag to set an output Logfile. The default is "/var/log/pykms_logserver.log".
|
2019-03-29 14:46:17 +01:00
|
|
|
|
2019-09-13 10:35:38 +02:00
|
|
|
# EN: log file size in MB
|
|
|
|
# RU: Максимальный размер Лог-файл в мегабайтах
|
|
|
|
ENV LOGSIZE ""
|
|
|
|
# Use this flag to set a maximum size (in MB) to the output log file. Desactivated by default.
|
|
|
|
|
2019-03-29 14:46:17 +01:00
|
|
|
# EN: Startup script
|
|
|
|
# RU: Скрипт автозапуска
|
|
|
|
COPY start.sh /usr/bin/start.sh
|
|
|
|
|
|
|
|
# EN: Software installation
|
|
|
|
# RU: Установка программного обеспечения
|
2019-09-13 10:35:38 +02:00
|
|
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.8/main" >> /etc/apk/repositories && \
|
2019-03-29 14:46:17 +01:00
|
|
|
apk update && \
|
|
|
|
apk upgrade && \
|
|
|
|
apk add --update \
|
|
|
|
bash \
|
|
|
|
git \
|
|
|
|
py3-argparse \
|
2019-09-13 10:35:38 +02:00
|
|
|
# py3-tz \
|
2019-03-29 14:46:17 +01:00
|
|
|
py3-flask \
|
|
|
|
py3-pygments \
|
2019-06-05 00:12:49 +02:00
|
|
|
python3-tkinter \
|
2019-03-29 14:46:17 +01:00
|
|
|
sqlite-libs \
|
|
|
|
py3-pip && \
|
|
|
|
|
|
|
|
# EN: Clone git-repo
|
|
|
|
# RU: Клонирование git-репозитория
|
2019-09-13 10:35:38 +02:00
|
|
|
git clone https://github.com/SystemRage/py-kms.git /tmp/py-kms && \
|
2019-03-29 14:46:17 +01:00
|
|
|
git clone https://github.com/coleifer/sqlite-web.git /tmp/sqlite_web && \
|
2019-09-13 10:35:38 +02:00
|
|
|
mv /tmp/py-kms/py-kms /home/ && \
|
2019-03-29 14:46:17 +01:00
|
|
|
mv /tmp/sqlite_web/sqlite_web /home/ && \
|
2019-09-13 10:35:38 +02:00
|
|
|
rm -rf /tmp/py-kms && \
|
2019-03-29 14:46:17 +01:00
|
|
|
rm -rf /tmp/sqlite_web && \
|
2019-09-13 10:35:38 +02:00
|
|
|
pip3 install peewee tzlocal pysqlite3 && \
|
2019-03-29 14:46:17 +01:00
|
|
|
|
|
|
|
# EN: Change permissions
|
|
|
|
# RU: Меняем права доступа
|
|
|
|
chmod a+x /usr/bin/start.sh && \
|
|
|
|
|
|
|
|
# EN: Clear after install software
|
|
|
|
# RU: Очистка после установки программного обеспечения
|
2019-09-13 10:35:38 +02:00
|
|
|
apk del git
|
2019-03-29 14:46:17 +01:00
|
|
|
|
|
|
|
# Set Workdir
|
2019-09-13 10:35:38 +02:00
|
|
|
WORKDIR /home/py-kms
|
2019-03-29 14:46:17 +01:00
|
|
|
|
|
|
|
# Expose ports
|
|
|
|
EXPOSE ${PORT}/tcp
|
|
|
|
|
|
|
|
# Entry point
|
2020-07-08 22:45:44 +02:00
|
|
|
ENTRYPOINT ["/usr/bin/start.sh"]
|