mirror of
https://github.com/11notes/docker-kms.git
synced 2025-10-24 16:43:42 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58910eb75d | ||
|
|
06e8f2a63e | ||
|
|
6ec2821901 | ||
|
|
a3a755b54e | ||
|
|
dd0025df2d | ||
|
|
23231c4cbb | ||
|
|
28586cccec | ||
|
|
ce51cbe448 | ||
|
|
c5b9d8f1fa |
138
.github/workflows/docker.yml
vendored
138
.github/workflows/docker.yml
vendored
@@ -1,22 +1,36 @@
|
|||||||
name: create and publish docker image
|
name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
release:
|
release:
|
||||||
description: 'set WORKFLOW_GITHUB_RELEASE'
|
description: 'set WORKFLOW_GITHUB_RELEASE'
|
||||||
required: true
|
required: false
|
||||||
default: 'true'
|
default: 'false'
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
env:
|
image:
|
||||||
WORKFLOW_GITHUB_RELEASE: true
|
description: 'set IMAGE'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
uid:
|
||||||
|
description: 'set IMAGE_UID'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
gid:
|
||||||
|
description: 'set IMAGE_GID'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
semverprefix:
|
||||||
|
description: 'prefix for semver tags'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
semversuffix:
|
||||||
|
description: 'suffix for semver tags'
|
||||||
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
@@ -26,6 +40,14 @@ jobs:
|
|||||||
- name: init / checkout
|
- name: init / checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
|
|
||||||
|
- name: init / inputs to env
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
run: |
|
||||||
|
cat << 'EOF' > .inputs
|
||||||
|
${{ toJSON(github.event.inputs) }}
|
||||||
|
EOF
|
||||||
|
for KEY in $(cat .inputs | jq --raw-output 'keys[]' | tr '\n' ' '); do echo "input_$(echo ${KEY} | tr '[:upper:]' '[:lower:]')=$(cat .inputs | jq --raw-output '.'${KEY}'')" >> $GITHUB_ENV; done
|
||||||
|
|
||||||
- name: init / .json to env
|
- name: init / .json to env
|
||||||
uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
|
uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
|
||||||
with:
|
with:
|
||||||
@@ -33,34 +55,42 @@ jobs:
|
|||||||
|
|
||||||
- name: init / setup environment
|
- name: init / setup environment
|
||||||
run: |
|
run: |
|
||||||
: # set default arch if not set
|
: # set image
|
||||||
|
LOCAL_IMAGE=${json_image}
|
||||||
|
if [ ! -z ${input_image} ]; then LOCAL_IMAGE=${input_image}; fi
|
||||||
|
echo "IMAGE=${LOCAL_IMAGE}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
: # set defaults
|
||||||
echo "IMAGE_ARCH=${json_arch:-linux/amd64,linux/arm64}" >> $GITHUB_ENV
|
echo "IMAGE_ARCH=${json_arch:-linux/amd64,linux/arm64}" >> $GITHUB_ENV
|
||||||
|
echo "WORKFLOW_GRYPE_SEVERITY_CUTOFF=${json_grype_severity:-high}" >> $GITHUB_ENV;
|
||||||
|
echo "WORKFLOW_GITHUB_RELEASE=${input_release:-true}" >> $GITHUB_ENV;
|
||||||
|
|
||||||
: # create tags for semver, stable and other shenanigans
|
: # create tags for semver, stable and other shenanigans
|
||||||
export LOCAL_SHA=$(git rev-parse --short HEAD)
|
LOCAL_SHA=$(git rev-parse --short HEAD)
|
||||||
export LOCAL_SEMVER_MAJOR=$(awk -F. '{ print $1 }' <<< ${json_version})
|
LOCAL_SEMVER_MAJOR=$(awk -F. '{ print $1 }' <<< ${json_semver_version})
|
||||||
export LOCAL_SEMVER_MINOR=$(awk -F. '{ print $2 }' <<< ${json_version})
|
LOCAL_SEMVER_MINOR=$(awk -F. '{ print $2 }' <<< ${json_semver_version})
|
||||||
export LOCAL_SEMVER_PATCH=$(awk -F. '{ print $3 }' <<< ${json_version})
|
LOCAL_SEMVER_PATCH=$(awk -F. '{ print $3 }' <<< ${json_semver_version})
|
||||||
export LOCAL_TAGS="${json_image}:${LOCAL_SHA}"
|
LOCAL_SEMVER_PREFIX=""
|
||||||
if [ ! -z ${LOCAL_SEMVER_MAJOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}"; fi
|
LOCAL_SEMVER_SUFFIX=""
|
||||||
if [ ! -z ${LOCAL_SEMVER_MINOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}"; fi
|
LOCAL_TAGS="${LOCAL_IMAGE}:${LOCAL_SHA}"
|
||||||
if [ ! -z ${LOCAL_SEMVER_PATCH} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}.${LOCAL_SEMVER_PATCH}"; fi
|
if [ ! -z ${input_semverprefix} ]; then LOCAL_SEMVER_PREFIX="${input_semverprefix}-"; fi
|
||||||
if echo "${LOCAL_TAGS}" | grep -q "${json_stable}" ; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:stable"; fi
|
if [ ! -z ${input_semversuffix} ]; then LOCAL_SEMVER_SUFFIX="-${input_semversuffix}"; fi
|
||||||
if echo "${LOCAL_TAGS}" | grep -q "${json_latest}" ; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:latest"; fi
|
if [ ! -z ${LOCAL_SEMVER_MAJOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_SEMVER_MAJOR}${LOCAL_SEMVER_SUFFIX}"; fi
|
||||||
if [ ! -z ${json_tags} ]; then SPECIAL_LOCAL_TAGS=$(echo ${json_tags} | sed 's/,/ /g'); for LOCAL_TAG in ${json_tags}; do LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_TAG}"; done; fi
|
if [ ! -z ${LOCAL_SEMVER_MINOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}${LOCAL_SEMVER_SUFFIX}"; fi
|
||||||
|
if [ ! -z ${LOCAL_SEMVER_PATCH} ]; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}.${LOCAL_SEMVER_PATCH}${LOCAL_SEMVER_SUFFIX}"; fi
|
||||||
|
if echo "${LOCAL_TAGS}" | grep -q "${json_semver_stable}" ; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}stable${LOCAL_SEMVER_SUFFIX}"; fi
|
||||||
|
if echo "${LOCAL_TAGS}" | grep -q "${json_semver_latest}" ; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}latest${LOCAL_SEMVER_SUFFIX}"; fi
|
||||||
|
if [ ! -z ${json_semver_tags} ]; then SPECIAL_LOCAL_TAGS=$(echo ${json_semver_tags} | sed 's/,/ /g'); for LOCAL_TAG in ${json_semver_tags}; do LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_TAG}${LOCAL_SEMVER_SUFFIX}"; done; fi
|
||||||
echo "IMAGE_TAGS=${LOCAL_TAGS}" >> $GITHUB_ENV
|
echo "IMAGE_TAGS=${LOCAL_TAGS}" >> $GITHUB_ENV
|
||||||
|
|
||||||
: # if for whatever reason UID/GID must be changed at build time
|
: # if for whatever reason UID/GID must be changed at build time
|
||||||
echo "IMAGE_UID=${json_uid:-1000}" >> $GITHUB_ENV
|
if [ ! -z ${input_uid} ]; then echo "IMAGE_UID=${input_uid}" >> $GITHUB_ENV; else echo "IMAGE_UID=${json_uid:-1000}" >> $GITHUB_ENV; fi
|
||||||
echo "IMAGE_GID=${json_gid:-1000}" >> $GITHUB_ENV
|
if [ ! -z ${input_gid} ]; then echo "IMAGE_GID=${input_gid}" >> $GITHUB_ENV; else echo "IMAGE_GID=${json_gid:-1000}" >> $GITHUB_ENV; fi
|
||||||
|
|
||||||
: # echo inputs
|
: # set prefix or suffix globally
|
||||||
echo "${{ toJSON(github.event.inputs) }}"
|
echo "IMAGE_SEMVER_PREFIX=${LOCAL_SEMVER_PREFIX}" >> $GITHUB_ENV
|
||||||
|
echo "IMAGE_SEMVER_SUFFIX=${LOCAL_SEMVER_SUFFIX}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: github / set workflow release
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
run: |
|
|
||||||
echo "WORKFLOW_GITHUB_RELEASE=${{ inputs.release }}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: docker / login to hub
|
- name: docker / login to hub
|
||||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
||||||
@@ -81,25 +111,27 @@ jobs:
|
|||||||
file: arch.dockerfile
|
file: arch.dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: ${{ env.IMAGE_ARCH }}
|
platforms: ${{ env.IMAGE_ARCH }}
|
||||||
cache-from: type=registry,ref=${{ env.json_image }}:buildcache
|
cache-from: type=registry,ref=${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}buildcache${{ env.IMAGE_SEMVER_SUFFIX }}
|
||||||
cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
|
cache-to: type=registry,ref=${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}buildcache${{ env.IMAGE_SEMVER_SUFFIX }},mode=max,compression=zstd,force-compression=true
|
||||||
build-args: |
|
build-args: |
|
||||||
APP_IMAGE=${{ env.json_image }}
|
APP_IMAGE=${{ env.IMAGE }}
|
||||||
APP_NAME=${{ env.json_name }}
|
APP_NAME=${{ env.json_name }}
|
||||||
APP_VERSION=${{ env.json_version }}
|
APP_VERSION=${{ env.json_semver_version }}
|
||||||
APP_ROOT=${{ env.json_root }}
|
APP_ROOT=${{ env.json_root }}
|
||||||
APP_UID=${{ env.IMAGE_UID }}
|
APP_UID=${{ env.IMAGE_UID }}
|
||||||
APP_GID=${{ env.IMAGE_GID }}
|
APP_GID=${{ env.IMAGE_GID }}
|
||||||
NO_CACHE=$(date +%s)
|
APP_VERSION_PREFIX=${{ env.IMAGE_SEMVER_PREFIX }}
|
||||||
|
APP_VERSION_SUFFIX=${{ env.IMAGE_SEMVER_SUFFIX }}
|
||||||
|
APP_NO_CACHE=$(date +%s)
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.json_image }}:grype
|
${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}grype${{ env.IMAGE_SEMVER_SUFFIX }}
|
||||||
|
|
||||||
- name: grype / scan
|
- name: grype / scan
|
||||||
id: scan
|
id: scan
|
||||||
uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
|
uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
|
||||||
with:
|
with:
|
||||||
image: ${{ env.json_image }}:grype
|
image: ${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}grype${{ env.IMAGE_SEMVER_SUFFIX }}
|
||||||
severity-cutoff: high
|
severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
|
||||||
|
|
||||||
- name: grype / report / print
|
- name: grype / report / print
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
@@ -109,7 +141,7 @@ jobs:
|
|||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
run: |
|
run: |
|
||||||
curl --request DELETE \
|
curl --request DELETE \
|
||||||
--url https://hub.docker.com/v2/repositories/${{ env.json_image }}/tags/grype/ \
|
--url https://hub.docker.com/v2/repositories/${{ env.IMAGE }}/tags/${{ env.IMAGE_SEMVER_PREFIX }}grype${{ env.IMAGE_SEMVER_SUFFIX }}/ \
|
||||||
--header 'authorization: jwt ${{ secrets.DOCKER_TOKEN }}' \
|
--header 'authorization: jwt ${{ secrets.DOCKER_TOKEN }}' \
|
||||||
--header 'content-type: application/json' \
|
--header 'content-type: application/json' \
|
||||||
--fail
|
--fail
|
||||||
@@ -128,16 +160,18 @@ jobs:
|
|||||||
sbom: true
|
sbom: true
|
||||||
provenance: mode=max
|
provenance: mode=max
|
||||||
platforms: ${{ env.IMAGE_ARCH }}
|
platforms: ${{ env.IMAGE_ARCH }}
|
||||||
cache-from: type=registry,ref=${{ env.json_image }}:buildcache
|
cache-from: type=registry,ref=${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}buildcache${{ env.IMAGE_SEMVER_SUFFIX }}
|
||||||
cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
|
cache-to: type=registry,ref=${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}buildcache${{ env.IMAGE_SEMVER_SUFFIX }},mode=max,compression=zstd,force-compression=true
|
||||||
build-args: |
|
build-args: |
|
||||||
APP_IMAGE=${{ env.json_image }}
|
APP_IMAGE=${{ env.IMAGE }}
|
||||||
APP_NAME=${{ env.json_name }}
|
APP_NAME=${{ env.json_name }}
|
||||||
APP_VERSION=${{ env.json_version }}
|
APP_VERSION=${{ env.json_semver_version }}
|
||||||
APP_ROOT=${{ env.json_root }}
|
APP_ROOT=${{ env.json_root }}
|
||||||
APP_UID=${{ env.IMAGE_UID }}
|
APP_UID=${{ env.IMAGE_UID }}
|
||||||
APP_GID=${{ env.IMAGE_GID }}
|
APP_GID=${{ env.IMAGE_GID }}
|
||||||
NO_CACHE=$(date +%s)
|
APP_VERSION_PREFIX=${{ env.IMAGE_SEMVER_PREFIX }}
|
||||||
|
APP_VERSION_SUFFIX=${{ env.IMAGE_SEMVER_SUFFIX }}
|
||||||
|
APP_NO_CACHE=$(date +%s)
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.IMAGE_TAGS }}
|
${{ env.IMAGE_TAGS }}
|
||||||
|
|
||||||
@@ -155,7 +189,7 @@ jobs:
|
|||||||
--header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
|
--header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
|
||||||
--header 'content-type: application/json' \
|
--header 'content-type: application/json' \
|
||||||
--data '{
|
--data '{
|
||||||
"description":"${{ env.json_description }}",
|
"description":"${{ env.json_readme_description }}",
|
||||||
"homepage":"",
|
"homepage":"",
|
||||||
"has_issues":true,
|
"has_issues":true,
|
||||||
"has_discussions":true,
|
"has_discussions":true,
|
||||||
@@ -165,19 +199,13 @@ jobs:
|
|||||||
--fail
|
--fail
|
||||||
|
|
||||||
- name: docker / push README.md to docker hub
|
- name: docker / push README.md to docker hub
|
||||||
|
if: hashFiles('README.md') != ''
|
||||||
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
|
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
|
||||||
env:
|
env:
|
||||||
DOCKER_USER: 11notes
|
DOCKER_USER: 11notes
|
||||||
DOCKER_PASS: ${{ secrets.DOCKER_TOKEN }}
|
DOCKER_PASS: ${{ secrets.DOCKER_TOKEN }}
|
||||||
with:
|
with:
|
||||||
destination_container_repo: ${{ env.json_image }}
|
destination_container_repo: ${{ env.IMAGE }}
|
||||||
provider: dockerhub
|
provider: dockerhub
|
||||||
short_description: ${{ env.json_description }}
|
short_description: ${{ env.json_readme_description }}
|
||||||
readme_file: 'README.md'
|
readme_file: 'README.md'
|
||||||
|
|
||||||
- name: github / dispatch workflow
|
|
||||||
if: env.json_dispatch_workflow != null
|
|
||||||
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc
|
|
||||||
with:
|
|
||||||
workflow: ${{ env.json_dispatch_workflow }}
|
|
||||||
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
|
||||||
17
.github/workflows/gui.yml
vendored
17
.github/workflows/gui.yml
vendored
@@ -1,17 +0,0 @@
|
|||||||
name: kms-gui
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
kms-gui:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: auto build and update downstream image
|
|
||||||
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc
|
|
||||||
with:
|
|
||||||
workflow: docker.yml
|
|
||||||
repo: 11notes/docker-kms-gui
|
|
||||||
ref: master
|
|
||||||
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
|
||||||
inputs: '{ "release": "false" }'
|
|
||||||
51
.github/workflows/tags.yml
vendored
Normal file
51
.github/workflows/tags.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
name: tags
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: build docker image
|
||||||
|
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
|
||||||
|
with:
|
||||||
|
workflow: docker.yml
|
||||||
|
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
||||||
|
inputs: '{ "release":"true" }'
|
||||||
|
|
||||||
|
docker-unraid:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: build docker image for unraid community
|
||||||
|
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
|
||||||
|
with:
|
||||||
|
workflow: docker.yml
|
||||||
|
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
||||||
|
inputs: '{ "release":"false", "uid":"99", "gid":"100", "semversuffix":"unraid" }'
|
||||||
|
|
||||||
|
kms-gui:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: docker
|
||||||
|
steps:
|
||||||
|
- name: build downstream kms gui
|
||||||
|
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
|
||||||
|
with:
|
||||||
|
workflow: docker.yml
|
||||||
|
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
||||||
|
repo: 11notes/docker-kms-gui
|
||||||
|
ref: master
|
||||||
|
inputs: '{ "release":"false" }'
|
||||||
|
|
||||||
|
kms-gui-unraid:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: docker-unraid
|
||||||
|
steps:
|
||||||
|
- name: build downstream kms gui for unraid community
|
||||||
|
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
|
||||||
|
with:
|
||||||
|
workflow: docker.yml
|
||||||
|
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
||||||
|
repo: 11notes/docker-kms-gui
|
||||||
|
ref: master
|
||||||
|
inputs: '{ "release":"false", "uid":"99", "gid":"100", "semversuffix":"unraid" }'
|
||||||
17
.json
17
.json
@@ -1,15 +1,18 @@
|
|||||||
{
|
{
|
||||||
"image":"11notes/kms",
|
"image":"11notes/kms",
|
||||||
"description":"Activate any version of Windows and Office, forever",
|
|
||||||
"name":"kms",
|
"name":"kms",
|
||||||
"version":"465f4d1",
|
|
||||||
"root":"/kms",
|
"root":"/kms",
|
||||||
|
|
||||||
"stable":"465f4d1",
|
"semver":{
|
||||||
"latest":"465f4d1",
|
"version":"465f4d1",
|
||||||
"parent":"11notes/alpine:stable",
|
"stable":"465f4d1",
|
||||||
|
"latest":"465f4d1"
|
||||||
|
},
|
||||||
|
|
||||||
"dispatch":{
|
"readme":{
|
||||||
"workflow":"gui.yml"
|
"description":"Activate any version of Windows and Office, forever",
|
||||||
|
"parent":{
|
||||||
|
"image":"11notes/alpine:stable"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
30
README.md
30
README.md
@@ -5,11 +5,21 @@
|
|||||||
|
|
||||||
**Activate any version of Windows and Office, forever**
|
**Activate any version of Windows and Office, forever**
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
# MAIN TAGS 🏷️
|
||||||
|
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
|
||||||
|
|
||||||
|
* [465f4d1](https://hub.docker.com/r/11notes/kms/tags?name=465f4d1)
|
||||||
|
* [stable](https://hub.docker.com/r/11notes/kms/tags?name=stable)
|
||||||
|
* [latest](https://hub.docker.com/r/11notes/kms/tags?name=latest)
|
||||||
|
* [465f4d1-unraid](https://hub.docker.com/r/11notes/kms/tags?name=465f4d1-unraid)
|
||||||
|
* [stable-unraid](https://hub.docker.com/r/11notes/kms/tags?name=stable-unraid)
|
||||||
|
* [latest-unraid](https://hub.docker.com/r/11notes/kms/tags?name=latest-unraid)
|
||||||
|
|
||||||
# SYNOPSIS 📖
|
# SYNOPSIS 📖
|
||||||
**What can I do with this?** This image will run a KMS server you can use to activate any version of Windows and Office, forever. If you need a GUI, simply add [11notes/kms-gui](https://github.com/11notes/docker-kms-gui) to your compose.
|
**What can I do with this?** This image will run a KMS server you can use to activate any version of Windows and Office, forever.
|
||||||
|
|
||||||
Works with:
|
Works with:
|
||||||
- Windows Vista
|
- Windows Vista
|
||||||
@@ -34,7 +44,7 @@ Works with:
|
|||||||
- Microsoft Office 2024 ( Volume License )
|
- Microsoft Office 2024 ( Volume License )
|
||||||
|
|
||||||
# VOLUMES 📁
|
# VOLUMES 📁
|
||||||
* **/kms/var** - Directory of the activation database
|
* **/var** - Directory of the activation database
|
||||||
|
|
||||||
# COMPOSE ✂️
|
# COMPOSE ✂️
|
||||||
```yaml
|
```yaml
|
||||||
@@ -51,7 +61,7 @@ services:
|
|||||||
- "1688:1688/tcp"
|
- "1688:1688/tcp"
|
||||||
restart: "always"
|
restart: "always"
|
||||||
kms-gui:
|
kms-gui:
|
||||||
image: "11notes/kms-gui:latest"
|
image: "11notes/kms-gui:stable"
|
||||||
container_name: "kms-gui"
|
container_name: "kms-gui"
|
||||||
environment:
|
environment:
|
||||||
TZ: "Europe/Zurich"
|
TZ: "Europe/Zurich"
|
||||||
@@ -69,7 +79,7 @@ volumes:
|
|||||||
```cmd
|
```cmd
|
||||||
slmgr /ipk D764K-2NDRG-47T6Q-P8T8W-YP6DF
|
slmgr /ipk D764K-2NDRG-47T6Q-P8T8W-YP6DF
|
||||||
```
|
```
|
||||||
Add your KMS server information to server
|
Add your KMS server information to server via registry
|
||||||
```powershell
|
```powershell
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -Name "KeyManagementServiceName" -Value "KMS_IP"
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -Name "KeyManagementServiceName" -Value "KMS_IP"
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -Name "KeyManagementServicePort" -Value "KMS_PORT"
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -Name "KeyManagementServicePort" -Value "KMS_PORT"
|
||||||
@@ -81,6 +91,9 @@ Activate server
|
|||||||
slmgr /ato
|
slmgr /ato
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# UNRAID VERSION 🟠
|
||||||
|
This image supports unraid by default. Simply add **-unraid** to any tag and the image will run as 99:100 instead of 1000:1000 causing no issues on unraid. Enjoy.
|
||||||
|
|
||||||
# DEFAULT SETTINGS 🗃️
|
# DEFAULT SETTINGS 🗃️
|
||||||
| Parameter | Value | Description |
|
| Parameter | Value | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
@@ -95,8 +108,6 @@ slmgr /ato
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `TZ` | [Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | |
|
| `TZ` | [Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | |
|
||||||
| `DEBUG` | Will activate debug option for container image and app (if available) | |
|
| `DEBUG` | Will activate debug option for container image and app (if available) | |
|
||||||
| `KMS_IP` | localhost or 127.0.0.1 or a dedicated IP | 0.0.0.0 |
|
|
||||||
| `KMS_PORT` | any port > 1024 | 1688 |
|
|
||||||
| `KMS_LOCALE` | see Microsoft LICD specification | 1033 (en-US) |
|
| `KMS_LOCALE` | see Microsoft LICD specification | 1033 (en-US) |
|
||||||
| `KMS_CLIENTCOUNT` | client count > 25 | 26 |
|
| `KMS_CLIENTCOUNT` | client count > 25 | 26 |
|
||||||
| `KMS_ACTIVATIONINTERVAL` | Retry unsuccessful after N minutes | 120 (2 hours) |
|
| `KMS_ACTIVATIONINTERVAL` | Retry unsuccessful after N minutes | 120 (2 hours) |
|
||||||
@@ -118,6 +129,7 @@ slmgr /ato
|
|||||||
* Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services
|
* Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services
|
||||||
* Do not expose this image to WAN! You will get notified from Microsoft via your ISP to terminate the service if you do so
|
* Do not expose this image to WAN! You will get notified from Microsoft via your ISP to terminate the service if you do so
|
||||||
* [Microsoft LICD](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a)
|
* [Microsoft LICD](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a)
|
||||||
|
* Use [11notes/kms-gui](https://github.com/11notes/docker-kms-gui) if you want to see the clients you activated in a nice GUI
|
||||||
|
|
||||||
# ElevenNotes™️
|
# 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. You can find all my repositories on [github](https://github.com/11notes?tab=repositories).
|
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).
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
### 🪄 Features
|
### 🪄 Features
|
||||||
* add Server 2025 KMS IDs by @ProfessorCha0s (thanks)
|
* add unraid version to base kms image (GUI will follow)
|
||||||
* add Office LTSC 2024 KMS IDs by @MrRubberDucky (thanks)
|
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
ARG APP_NAME
|
ARG APP_NAME
|
||||||
ARG APP_VERSION
|
ARG APP_VERSION
|
||||||
ARG APP_ROOT
|
ARG APP_ROOT
|
||||||
|
ARG APP_UID
|
||||||
|
ARG APP_GID
|
||||||
|
|
||||||
# :: environment
|
# :: environment
|
||||||
ENV APP_IMAGE=${APP_IMAGE}
|
ENV APP_IMAGE=${APP_IMAGE}
|
||||||
@@ -27,8 +29,6 @@
|
|||||||
ENV APP_VERSION=${APP_VERSION}
|
ENV APP_VERSION=${APP_VERSION}
|
||||||
ENV APP_ROOT=${APP_ROOT}
|
ENV APP_ROOT=${APP_ROOT}
|
||||||
|
|
||||||
ENV KMS_IP=0.0.0.0
|
|
||||||
ENV KMS_PORT=1688
|
|
||||||
ENV KMS_LOCALE=1033
|
ENV KMS_LOCALE=1033
|
||||||
ENV KMS_CLIENTCOUNT=26
|
ENV KMS_CLIENTCOUNT=26
|
||||||
ENV KMS_ACTIVATIONINTERVAL=120
|
ENV KMS_ACTIVATIONINTERVAL=120
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
# :: Run
|
# :: Run
|
||||||
USER root
|
USER root
|
||||||
|
RUN eleven printenv;
|
||||||
|
|
||||||
# :: install application
|
# :: install application
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@@ -63,6 +64,10 @@
|
|||||||
${APP_ROOT} \
|
${APP_ROOT} \
|
||||||
/opt/py-kms;
|
/opt/py-kms;
|
||||||
|
|
||||||
|
# :: support unraid
|
||||||
|
RUN set -ex; \
|
||||||
|
eleven unraid
|
||||||
|
|
||||||
# :: Volumes
|
# :: Volumes
|
||||||
VOLUME ["${APP_ROOT}/var"]
|
VOLUME ["${APP_ROOT}/var"]
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ services:
|
|||||||
- "1688:1688/tcp"
|
- "1688:1688/tcp"
|
||||||
restart: "always"
|
restart: "always"
|
||||||
kms-gui:
|
kms-gui:
|
||||||
image: "11notes/kms-gui:latest"
|
image: "11notes/kms-gui:stable"
|
||||||
container_name: "kms-gui"
|
container_name: "kms-gui"
|
||||||
environment:
|
environment:
|
||||||
TZ: "Europe/Zurich"
|
TZ: "Europe/Zurich"
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
cd /opt/py-kms
|
cd /opt/py-kms
|
||||||
set -- "python3" \
|
set -- "python3" \
|
||||||
pykms_Server.py \
|
pykms_Server.py \
|
||||||
${KMS_IP} \
|
0.0.0.0 \
|
||||||
${KMS_PORT} \
|
1688 \
|
||||||
-l ${KMS_LOCALE} \
|
-l ${KMS_LOCALE} \
|
||||||
-c ${KMS_CLIENTCOUNT} \
|
-c ${KMS_CLIENTCOUNT} \
|
||||||
-a ${KMS_ACTIVATIONINTERVAL} \
|
-a ${KMS_ACTIVATIONINTERVAL} \
|
||||||
|
|||||||
Reference in New Issue
Block a user