Skip to content

Commit

Permalink
Merge pull request #8 from TheSpad/new-lsio-base
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad authored Dec 9, 2021
2 parents 54df175 + 6e6c27d commit b771e51
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 354 deletions.
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ updates:
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
63 changes: 0 additions & 63 deletions .github/workflows/bakebuild.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/called-bakebuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Image On Release

on:
release:
types: [ published ]
pull_request:
branches:
- 'main'
types: [ assigned ]

jobs:
call-workflow:
uses: thespad/actions/.github/workflows/bakebuild.yml@v3
with:
repo_owner: ${{ github.repository_owner }}
app_name: "py-kms"
dockerhub_user: "thespad"
secrets:
dockerhub_password: ${{ secrets.DOCKER_PASSWORD }}
16 changes: 16 additions & 0 deletions .github/workflows/called-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check for update and release

on:
workflow_dispatch:
schedule:
- cron: '0 11 * * *'

jobs:
call-workflow:
uses: thespad/actions/.github/workflows/ci.yml@v3
with:
repo_owner: ${{ github.repository_owner }}
app_name: "py-kms"
release_type: "script"
secrets:
repo_scoped_token: ${{ secrets.repo_scoped_token }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
*.python3
*.sh
*.python3
25 changes: 7 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
FROM alpine:3.14

ENV IP 0.0.0.0
ENV PORT 1688
ENV EPID ""
ENV LCID 1033
ENV CLIENT_COUNT 26
ENV ACTIVATION_INTERVAL 120
ENV RENEWAL_INTERVAL 10080
ENV HWID "RANDOM"
ENV LOGLEVEL INFO
ENV LOGFILE /var/log/pykms_logserver.log
ENV LOGSIZE ""
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
LABEL maintainer="Adam Beardwood"

RUN \
apk add --update --no-cache --virtual=build-dependencies \
Expand All @@ -27,18 +16,18 @@ RUN \
python3-tkinter \
sqlite-libs \
py3-pip && \
pip3 install peewee tzlocal && \
git clone https://github.com/SystemRage/py-kms/ /tmp/py-kms && \
pip3 install -U --no-cache-dir peewee tzlocal && \
git clone https://github.com/Py-KMS-Organization/py-kms/ /tmp/py-kms && \
mv /tmp/py-kms/py-kms /home/ && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*

COPY /pykms_Base.py /home/py-kms
COPY root/ /

WORKDIR /home/py-kms

EXPOSE ${PORT}/tcp
EXPOSE 1688/tcp

ENTRYPOINT /usr/bin/python3 pykms_Server.py ${IP} ${PORT} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE}
VOLUME /config
7 changes: 3 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
[![License](https://img.shields.io/github/license/thespad/docker-py-kms?color=94398d&logo=Github&logoColor=ffffff&style=for-the-badge)](#)
[![Commits](https://img.shields.io/github/commits-since/thespad/docker-py-kms/latest?color=94398d&include_prereleases&logo=github&style=for-the-badge)](#)

[py-kms](https://github.com/SystemRage/py-kms) is a port of node-kms created by cyrozap, which is a port of either the C#, C++, or .NET implementations of KMS Emulator. The original version was written by CODYQX4 and is derived from the reverse-engineered code of Microsoft's official KMS.
[py-kms](https://github.com/Py-KMS-Organization/py-kms) is a port of node-kms created by cyrozap, which is a port of either the C#, C++, or .NET implementations of KMS Emulator. The original version was written by CODYQX4 and is derived from the reverse-engineered code of Microsoft's official KMS. This version of py-kms is itself a fork of the original implementation by SystemRage, which was abandoned early 2021.

Update: Proper builds are now available [here](https://github.com/Py-KMS-Organization/py-kms).

These are builds of the Minimal image, with Server 2022 support until the offical docker builds are working again.
These are my own builds of the Minimal image using the [LSIO base](https://github.com/linuxserver/docker-baseimage-alpine) and s6 because the upstream project keeps accepting PRs for the entrypoint scripts that change their behaviour in ways that break the container.

## Versions

* **09.12.21:** - New container build from LSIO Alpine 3.15 base.
* **01.09.21:** - Initial Release.
5 changes: 5 additions & 0 deletions get-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

APP_VERSION=$(curl -sX GET https://api.github.com/repos/Py-KMS-Organization/py-kms/commits?sha=master | jq -r 'first(.[] ) | .sha' | cut -c 1-7)

printf "%s" "${APP_VERSION}"
Loading

0 comments on commit b771e51

Please sign in to comment.