mirror of
https://github.com/11notes/docker-kms.git
synced 2025-10-23 04:52:15 +00:00
Compare commits
9 Commits
d5643d374d
...
efbc374fdf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efbc374fdf | ||
|
|
2fe67967b0 | ||
|
|
7fe09c3a65 | ||
|
|
abf93ebf36 | ||
|
|
c7ceef1895 | ||
|
|
79e9f980dd | ||
|
|
75e540239a | ||
|
|
3b9fdb0518 | ||
|
|
8744c5a656 |
70
.github/workflows/cve.yml
vendored
Normal file
70
.github/workflows/cve.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: cve
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "30 15 */2 * *"
|
||||
|
||||
jobs:
|
||||
cve:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: init / checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
ref: ${{ github.ref_name }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: init / setup environment
|
||||
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
|
||||
with:
|
||||
script: |
|
||||
const { existsSync, readFileSync } = require('node:fs');
|
||||
const { resolve } = require('node:path');
|
||||
const { inspect } = require('node:util');
|
||||
const { Buffer } = require('node:buffer');
|
||||
const inputs = `${{ toJSON(github.event.inputs) }}`;
|
||||
const opt = {input:{}, dot:{}};
|
||||
|
||||
try{
|
||||
if(inputs.length > 0){
|
||||
opt.input = JSON.parse(inputs);
|
||||
if(opt.input?.etc){
|
||||
opt.input.etc = JSON.parse(Buffer.from(opt.input.etc, 'base64').toString('ascii'));
|
||||
}
|
||||
}
|
||||
}catch(e){
|
||||
core.warning('could not parse github.event.inputs');
|
||||
}
|
||||
|
||||
try{
|
||||
const path = resolve('.json');
|
||||
if(existsSync(path)){
|
||||
try{
|
||||
opt.dot = JSON.parse(readFileSync(path).toString());
|
||||
}catch(e){
|
||||
throw new Error('could not parse .json');
|
||||
}
|
||||
}else{
|
||||
throw new Error('.json does not exist');
|
||||
}
|
||||
}catch(e){
|
||||
core.setFailed(e);
|
||||
}
|
||||
|
||||
core.info(inspect(opt, {showHidden:false, depth:null, colors:true}));
|
||||
|
||||
core.exportVariable('WORKFLOW_IMAGE', `${opt.dot.image}:${(opt.dot?.semver?.version === undefined) ? 'rolling' : opt.dot.semver.version}`);
|
||||
core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.dot?.grype?.severity || 'high'));
|
||||
|
||||
|
||||
- name: grype / scan
|
||||
id: grype
|
||||
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
|
||||
with:
|
||||
image: ${{ env.WORKFLOW_IMAGE }}
|
||||
fail-build: true
|
||||
severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
|
||||
output-format: 'sarif'
|
||||
by-cve: true
|
||||
cache-db: true
|
||||
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
@@ -16,6 +16,7 @@ on:
|
||||
required: false
|
||||
default: 'ubuntu-22.04'
|
||||
|
||||
|
||||
build:
|
||||
description: 'set WORKFLOW_BUILD'
|
||||
required: false
|
||||
@@ -227,7 +228,7 @@ jobs:
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
- name: docker / build & push & tag grype
|
||||
- name: docker / build image locally
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
id: docker-build
|
||||
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
|
||||
@@ -256,7 +257,7 @@ jobs:
|
||||
cache-db: true
|
||||
|
||||
- name: grype / fail
|
||||
if: env.WORKFLOW_BUILD == 'true' && (failure() || steps.grype.outcome == 'failure')
|
||||
if: env.WORKFLOW_BUILD == 'true' && (failure() || steps.grype.outcome == 'failure') && steps.docker-build.outcome == 'success'
|
||||
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
|
||||
with:
|
||||
image: ${{ env.DOCKER_CACHE_GRYPE }}
|
||||
@@ -266,7 +267,7 @@ jobs:
|
||||
by-cve: true
|
||||
cache-db: true
|
||||
|
||||
- name: docker / build & push
|
||||
- name: docker / build image from cache and push to registries
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
|
||||
with:
|
||||
@@ -412,6 +413,9 @@ jobs:
|
||||
if [ -f compose.yaml ]; then
|
||||
git add compose.yaml
|
||||
fi
|
||||
if [ -f compose.yml ]; then
|
||||
git add compose.yml
|
||||
fi
|
||||
if [ -f LICENSE ]; then
|
||||
git add LICENSE
|
||||
fi
|
||||
|
||||
16
.json
16
.json
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"image": "11notes/kms",
|
||||
"name": "kms",
|
||||
"root": "/kms",
|
||||
"arch": "linux/amd64,linux/arm64,linux/arm/v7",
|
||||
"image":"11notes/kms",
|
||||
"name":"kms",
|
||||
"root":"/kms",
|
||||
"arch":"linux/amd64,linux/arm64,linux/arm/v7",
|
||||
"semver": {
|
||||
"version": "1.0.1"
|
||||
"version":"1.0.3"
|
||||
},
|
||||
"readme": {
|
||||
"description": "Activate any version of Windows and Office, forever",
|
||||
"description":"Activate any version of Windows and Office, forever",
|
||||
"parent": {
|
||||
"image": "11notes/alpine:stable"
|
||||
"image":"11notes/python:3.13"
|
||||
},
|
||||
"built": {
|
||||
"11notes/py-kms": "https://github.com/11notes/fork-py-kms"
|
||||
"11notes/py-kms":"https://github.com/11notes/fork-py-kms"
|
||||
}
|
||||
}
|
||||
}
|
||||
22
README.md
22
README.md
@@ -1,7 +1,7 @@
|
||||

|
||||
|
||||
# KMS
|
||||
[<img src="https://img.shields.io/github/issues/11notes/docker-KMS?color=7842f5">](https://github.com/11notes/docker-KMS/issues)
|
||||
[<img src="https://img.shields.io/github/issues/11notes/docker-KMS?color=7842f5">](https://github.com/11notes/docker-KMS/issues)
|
||||
|
||||
Activate any version of Windows and Office, forever
|
||||
|
||||
@@ -42,7 +42,7 @@ Works with:
|
||||
name: "kms"
|
||||
services:
|
||||
app:
|
||||
image: "11notes/kms:1.0.1"
|
||||
image: "11notes/kms:1.0.3"
|
||||
environment:
|
||||
TZ: "Europe/Zurich"
|
||||
volumes:
|
||||
@@ -52,7 +52,7 @@ services:
|
||||
restart: "always"
|
||||
|
||||
gui:
|
||||
image: "11notes/kms-gui:1.0.1"
|
||||
image: "11notes/kms:1.0.3"
|
||||
depends_on:
|
||||
app:
|
||||
condition: "service_healthy"
|
||||
@@ -108,19 +108,19 @@ slmgr /ato
|
||||
# MAIN TAGS 🏷️
|
||||
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
|
||||
|
||||
* [1.0.1](https://hub.docker.com/r/11notes/kms/tags?name=1.0.1)
|
||||
* [1.0.1-unraid](https://hub.docker.com/r/11notes/kms/tags?name=1.0.1-unraid)
|
||||
* [1.0.3](https://hub.docker.com/r/11notes/kms/tags?name=1.0.3)
|
||||
* [1.0.3-unraid](https://hub.docker.com/r/11notes/kms/tags?name=1.0.3-unraid)
|
||||
|
||||
### There is no latest tag, what am I supposed to do about updates?
|
||||
It is of my opinion that the ```:latest``` tag is super dangerous. Many times, I’ve introduced **breaking** changes to my images. This would have messed up everything for some people. If you don’t want to change the tag to the latest [semver](https://semver.org/), simply use the short versions of [semver](https://semver.org/). Instead of using ```:1.0.1``` you can use ```:1``` or ```:1.0```. Since on each new version these tags are updated to the latest version of the software, using them is identical to using ```:latest``` but at least fixed to a major or minor version.
|
||||
It is of my opinion that the ```:latest``` tag is dangerous. Many times, I’ve introduced **breaking** changes to my images. This would have messed up everything for some people. If you don’t want to change the tag to the latest [semver](https://semver.org/), simply use the short versions of [semver](https://semver.org/). Instead of using ```:1.0.3``` you can use ```:1``` or ```:1.0```. Since on each new version these tags are updated to the latest version of the software, using them is identical to using ```:latest``` but at least fixed to a major or minor version.
|
||||
|
||||
If you still insist on having the bleeding edge release of this app, simply use the ```:rolling``` tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
|
||||
|
||||
# REGISTRIES ☁️
|
||||
```
|
||||
docker pull 11notes/kms:1.0.1
|
||||
docker pull ghcr.io/11notes/kms:1.0.1
|
||||
docker pull quay.io/11notes/kms:1.0.1
|
||||
docker pull 11notes/kms:1.0.3
|
||||
docker pull ghcr.io/11notes/kms:1.0.3
|
||||
docker pull quay.io/11notes/kms:1.0.3
|
||||
```
|
||||
|
||||
# UNRAID VERSION 🟠
|
||||
@@ -130,7 +130,7 @@ This image supports unraid by default. Simply add **-unraid** to any tag and the
|
||||
* [11notes/kms](https://github.com/11notes/docker-KMS)
|
||||
|
||||
# PARENT IMAGE 🏛️
|
||||
* [11notes/alpine:stable](https://hub.docker.com/r/11notes/alpine)
|
||||
* [11notes/python:3.13](${{ json_readme_parent_url }})
|
||||
|
||||
# BUILT WITH 🧰
|
||||
* [11notes/py-kms](https://github.com/11notes/fork-py-kms)
|
||||
@@ -147,4 +147,4 @@ This image supports unraid by default. Simply add **-unraid** to any tag and the
|
||||
# ElevenNotes™️
|
||||
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the [releases](https://github.com/11notes/docker-kms/releases) for breaking changes. If you have any problems with using this image simply raise an [issue](https://github.com/11notes/docker-kms/issues), thanks. If you have a question or inputs please create a new [discussion](https://github.com/11notes/docker-kms/discussions) instead of an issue. You can find all my other repositories on [github](https://github.com/11notes?tab=repositories).
|
||||
|
||||
*created 12.06.2025, 07:23:07 (CET)*
|
||||
*created 09.07.2025, 21:38:36 (CET)*
|
||||
@@ -4,6 +4,7 @@
|
||||
# GLOBAL
|
||||
ARG APP_UID=1000 \
|
||||
APP_GID=1000 \
|
||||
BUILD_SRC=https://github.com/11notes/fork-py-kms.git \
|
||||
BUILD_ROOT=/git/fork-py-kms
|
||||
|
||||
# :: FOREIGN IMAGES
|
||||
@@ -15,11 +16,16 @@
|
||||
# :: PY-KMS
|
||||
FROM alpine/git AS build
|
||||
ARG APP_VERSION \
|
||||
BUILD_SRC \
|
||||
BUILD_ROOT
|
||||
|
||||
RUN set -ex; \
|
||||
git clone ${BUILD_SRC} -b next; \
|
||||
cd ${BUILD_ROOT}; \
|
||||
git checkout v${APP_VERSION};
|
||||
|
||||
RUN set -ex; \
|
||||
git clone https://github.com/11notes/fork-py-kms -b next; \
|
||||
cd ${BUILD_ROOT}; \
|
||||
git checkout v${APP_VERSION}; \
|
||||
cp -R ${BUILD_ROOT}/docker/docker-py3-kms-minimal/requirements.txt ${BUILD_ROOT}/py-kms/requirements.txt; \
|
||||
cp -R ${BUILD_ROOT}/docker/docker-py3-kms/requirements.txt ${BUILD_ROOT}/py-kms/requirements.gui.txt;
|
||||
|
||||
@@ -27,7 +33,7 @@
|
||||
# ║ IMAGE ║
|
||||
# ╚═════════════════════════════════════════════════════╝
|
||||
# :: HEADER
|
||||
FROM 11notes/alpine:stable
|
||||
FROM 11notes/python:3.13
|
||||
|
||||
# :: default arguments
|
||||
ARG TARGETPLATFORM \
|
||||
@@ -68,12 +74,9 @@
|
||||
|
||||
# :: RUN
|
||||
USER root
|
||||
RUN eleven printenv;
|
||||
|
||||
# :: install dependencies
|
||||
RUN set -ex; \
|
||||
apk --no-cache --update add \
|
||||
python3; \
|
||||
apk --no-cache --update --virtual .build add \
|
||||
py3-pip;
|
||||
|
||||
@@ -84,7 +87,7 @@
|
||||
pip3 install pytz; \
|
||||
pip3 list -o | sed 's/pip.*//' | grep . | cut -f1 -d' ' | tr " " "\n" | awk '{if(NR>=3)print}' | cut -d' ' -f1 | xargs -n1 pip3 install -U; \
|
||||
apk del --no-network .build; \
|
||||
rm -rf /usr/lib/python3.12/site-packages/pip;
|
||||
rm -rf /usr/lib/python3.13/site-packages/pip;
|
||||
|
||||
# :: copy root filesystem and set correct permissions
|
||||
COPY ./rootfs /
|
||||
@@ -103,7 +106,8 @@
|
||||
|
||||
# :: HEALTH
|
||||
HEALTHCHECK --interval=5s --timeout=2s --start-interval=5s \
|
||||
CMD netstat -an | grep -q 1688
|
||||
CMD ["/usr/bin/nc", "-z", "localhost", "1688"]
|
||||
|
||||
# :: EXECUTE
|
||||
USER ${APP_UID}:${APP_GID}
|
||||
USER ${APP_UID}:${APP_GID}
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/entrypoint.sh"]
|
||||
@@ -1,7 +1,7 @@
|
||||
name: "kms"
|
||||
services:
|
||||
app:
|
||||
image: "11notes/kms:1.0.1"
|
||||
image: "11notes/kms:1.0.3"
|
||||
environment:
|
||||
TZ: "Europe/Zurich"
|
||||
volumes:
|
||||
@@ -11,7 +11,7 @@ services:
|
||||
restart: "always"
|
||||
|
||||
gui:
|
||||
image: "11notes/kms-gui:1.0.1"
|
||||
image: "11notes/kms:1.0.3"
|
||||
depends_on:
|
||||
app:
|
||||
condition: "service_healthy"
|
||||
|
||||
Reference in New Issue
Block a user