mirror of
				https://github.com/11notes/docker-kms.git
				synced 2025-11-04 05:53:44 +00:00 
			
		
		
		
	Compare commits
	
		
			90 Commits
		
	
	
		
			v0.0.1
			...
			727bf1f243
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					727bf1f243 | ||
| 
						 | 
					2dcd91990a | ||
| 
						 | 
					7519a01ba5 | ||
| 
						 | 
					b4f0d240df | ||
| 
						 | 
					cdb5a78fb4 | ||
| 
						 | 
					4c77d9218e | ||
| 
						 | 
					c0bf59835e | ||
| 
						 | 
					543a33b1bf | ||
| 
						 | 
					cc8b9eb8ec | ||
| 
						 | 
					49b56ac50b | ||
| 
						 | 
					84c8141758 | ||
| 
						 | 
					e8aa27002d | ||
| 
						 | 
					c42936bf8c | ||
| 
						 | 
					bad0decb4a | ||
| 
						 | 
					914dacaaf5 | ||
| 
						 | 
					6ae34d7b40 | ||
| 
						 | 
					98dd10e9db | ||
| 
						 | 
					46a338a6eb | ||
| 
						 | 
					bb7d6b68ce | ||
| 
						 | 
					06b86cbc27 | ||
| 
						 | 
					f9031c3b01 | ||
| 
						 | 
					5453f6d93a | ||
| 
						 | 
					607ebb9cf7 | ||
| 
						 | 
					62b10178d3 | ||
| 
						 | 
					74f3f1a6d8 | ||
| 
						 | 
					9da23cfa1f | ||
| 
						 | 
					88106c5ab3 | ||
| 
						 | 
					3c49769856 | ||
| 
						 | 
					0731c67061 | ||
| 
						 | 
					5ad13ddfeb | ||
| 
						 | 
					3045fea5a5 | ||
| 
						 | 
					98df1f7f0a | ||
| 
						 | 
					803d20d5e0 | ||
| 
						 | 
					cb4531c479 | ||
| 
						 | 
					e340cb2fd5 | ||
| 
						 | 
					6be75ef815 | ||
| 
						 | 
					26c465e656 | ||
| 
						 | 
					c36ab2d369 | ||
| 
						 | 
					ea186dd607 | ||
| 
						 | 
					5d47cf0b9f | ||
| 
						 | 
					bad5f50548 | ||
| 
						 | 
					e6bf310706 | ||
| 
						 | 
					b9c5b148a1 | ||
| 
						 | 
					46dab8b24f | ||
| 
						 | 
					b154c116cc | ||
| 
						 | 
					66090fdadb | ||
| 
						 | 
					58910eb75d | ||
| 
						 | 
					06e8f2a63e | ||
| 
						 | 
					6ec2821901 | ||
| 
						 | 
					a3a755b54e | ||
| 
						 | 
					dd0025df2d | ||
| 
						 | 
					23231c4cbb | ||
| 
						 | 
					28586cccec | ||
| 
						 | 
					ce51cbe448 | ||
| 
						 | 
					c5b9d8f1fa | ||
| 
						 | 
					bd566a8900 | ||
| 
						 | 
					58a28d8852 | ||
| 
						 | 
					44e604d964 | ||
| 
						 | 
					c055cc3fb2 | ||
| 
						 | 
					74661d19d9 | ||
| 
						 | 
					ad35b06dc0 | ||
| 
						 | 
					efccd9cdb3 | ||
| 
						 | 
					5c6e416ce4 | ||
| 
						 | 
					48a5ba320c | ||
| 
						 | 
					78d0173da0 | ||
| 
						 | 
					c157fc1094 | ||
| 
						 | 
					b48eeb675e | ||
| 
						 | 
					18c70eb586 | ||
| 
						 | 
					b1ff4dc249 | ||
| 
						 | 
					39c409583f | ||
| 
						 | 
					7b2d310a77 | ||
| 
						 | 
					33a59cfaa8 | ||
| 
						 | 
					fdfa93cda8 | ||
| 
						 | 
					8a2410c6dd | ||
| 
						 | 
					976e5908d6 | ||
| 
						 | 
					bbc70f4e85 | ||
| 
						 | 
					5e99a47212 | ||
| 
						 | 
					2bc18274b2 | ||
| 
						 | 
					496ef93b83 | ||
| 
						 | 
					abf8bacdb1 | ||
| 
						 | 
					6896f7af81 | ||
| 
						 | 
					08eb107dbe | ||
| 
						 | 
					12d475a9bf | ||
| 
						 | 
					63923d266c | ||
| 
						 | 
					57a7806590 | ||
| 
						 | 
					fdb14fa9a8 | ||
| 
						 | 
					1e7ec66f87 | ||
| 
						 | 
					f69b4b2667 | ||
| 
						 | 
					5f3c446be5 | ||
| 
						 | 
					a5c9b72fa9 | 
@@ -1,5 +1,7 @@
 | 
				
			|||||||
 | 
					# default
 | 
				
			||||||
.git*
 | 
					.git*
 | 
				
			||||||
*.md
 | 
					 | 
				
			||||||
LICENSE
 | 
					 | 
				
			||||||
maintain/
 | 
					maintain/
 | 
				
			||||||
project*
 | 
					LICENSE
 | 
				
			||||||
 | 
					*.md
 | 
				
			||||||
 | 
					img/
 | 
				
			||||||
 | 
					node_modules/
 | 
				
			||||||
							
								
								
									
										5
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							@@ -1,2 +1,3 @@
 | 
				
			|||||||
# Auto detect text files and perform LF normalization
 | 
					# default
 | 
				
			||||||
* text=auto
 | 
					*                 text=auto
 | 
				
			||||||
 | 
					*.sh              eol=lf
 | 
				
			||||||
							
								
								
									
										470
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										470
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,135 +1,424 @@
 | 
				
			|||||||
name: create and publish docker image
 | 
					name: docker
 | 
				
			||||||
 | 
					run-name: ${{ inputs.run-name }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
  push:
 | 
					    inputs:
 | 
				
			||||||
    tags:
 | 
					      run-name:
 | 
				
			||||||
      - 'v*'
 | 
					        description: 'set run-name for workflow (multiple calls)'
 | 
				
			||||||
 | 
					        type: string
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'docker'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
env:
 | 
					      runs-on:
 | 
				
			||||||
  DOCKER_USERNAME: 11notes
 | 
					        description: 'set runs-on for workflow (github or selfhosted)'
 | 
				
			||||||
 | 
					        type: string
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'ubuntu-22.04'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      build:
 | 
				
			||||||
 | 
					        description: 'set WORKFLOW_BUILD'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'true'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      release:
 | 
				
			||||||
 | 
					        description: 'set WORKFLOW_GITHUB_RELEASE'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'false'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      readme:
 | 
				
			||||||
 | 
					        description: 'set WORKFLOW_GITHUB_README'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'false'
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					      etc:
 | 
				
			||||||
 | 
					        description: 'base64 encoded json string'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build-and-push-image:
 | 
					  docker:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ${{ inputs.runs-on }}
 | 
				
			||||||
 | 
					    timeout-minutes: 1440
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    services:
 | 
				
			||||||
 | 
					      registry:
 | 
				
			||||||
 | 
					        image: registry:2
 | 
				
			||||||
 | 
					        ports:
 | 
				
			||||||
 | 
					          - 5000:5000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
 | 
					      actions: read
 | 
				
			||||||
      contents: write
 | 
					      contents: write
 | 
				
			||||||
      packages: write
 | 
					      packages: write
 | 
				
			||||||
      security-events: write
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:   
 | 
					    steps:   
 | 
				
			||||||
      - name: init / checkout
 | 
					      - name: init / checkout
 | 
				
			||||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 | 
					        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: init / .json to env
 | 
					 | 
				
			||||||
        uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filename: '.json'
 | 
					          ref: ${{ github.ref_name }}
 | 
				
			||||||
 | 
					          fetch-depth: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: init / setup environment
 | 
					      - name: init / setup environment
 | 
				
			||||||
        run: |
 | 
					        uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
 | 
				
			||||||
          : # set default arch if not set
 | 
					 | 
				
			||||||
          echo "IMAGE_ARCH=${json_arch:-linux/amd64,linux/arm64}" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          : # create tags for semver, stable and other shenanigans
 | 
					 | 
				
			||||||
          export LOCAL_SHA=$(git rev-parse --short HEAD)
 | 
					 | 
				
			||||||
          export LOCAL_SEMVER_MAJOR=$(awk -F. '{ print $1 }' <<< ${json_version})
 | 
					 | 
				
			||||||
          export LOCAL_SEMVER_MINOR=$(awk -F. '{ print $2 }' <<< ${json_version})
 | 
					 | 
				
			||||||
          export LOCAL_SEMVER_PATCH=$(awk -F. '{ print $3 }' <<< ${json_version})
 | 
					 | 
				
			||||||
          export LOCAL_TAGS="${json_image}:latest"
 | 
					 | 
				
			||||||
          if [ ! -z ${LOCAL_SEMVER_MAJOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}"; fi
 | 
					 | 
				
			||||||
          if [ ! -z ${LOCAL_SEMVER_MINOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}"; fi
 | 
					 | 
				
			||||||
          if [ ! -z ${LOCAL_SEMVER_PATCH} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}.${LOCAL_SEMVER_PATCH}"; fi
 | 
					 | 
				
			||||||
          if echo "${LOCAL_TAGS}" | grep -q "${json_stable}" ; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:stable"; 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
 | 
					 | 
				
			||||||
          LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SHA}"
 | 
					 | 
				
			||||||
          echo "IMAGE_TAGS=${LOCAL_TAGS}" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          : # if for whatever reason UID/GID must be changed at build time
 | 
					 | 
				
			||||||
          echo "IMAGE_UID=${json_uid:-1000}" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
          echo "IMAGE_GID=${json_gid:-1000}" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: docker / login to hub
 | 
					 | 
				
			||||||
        uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          username: ${{ env.DOCKER_USERNAME }}
 | 
					          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}));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const docker = {
 | 
				
			||||||
 | 
					              image:{
 | 
				
			||||||
 | 
					                name:opt.dot.image,
 | 
				
			||||||
 | 
					                arch:(opt.dot.arch || 'linux/amd64,linux/arm64'),
 | 
				
			||||||
 | 
					                prefix:((opt.input?.etc?.semverprefix) ? `${opt.input?.etc?.semverprefix}-` : ''),
 | 
				
			||||||
 | 
					                suffix:((opt.input?.etc?.semversuffix) ? `-${opt.input?.etc?.semversuffix}` : ''),
 | 
				
			||||||
 | 
					                description:(opt.dot?.readme?.description || ''),
 | 
				
			||||||
 | 
					                tags:[],
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              app:{
 | 
				
			||||||
 | 
					                image:opt.dot.image,
 | 
				
			||||||
 | 
					                name:opt.dot.name,
 | 
				
			||||||
 | 
					                version:(opt.input?.etc?.version || opt.dot.semver.version),
 | 
				
			||||||
 | 
					                root:opt.dot.root,
 | 
				
			||||||
 | 
					                UID:(opt.input?.etc?.uid || 1000),
 | 
				
			||||||
 | 
					                GID:(opt.input?.etc?.gid || 1000),
 | 
				
			||||||
 | 
					                no_cache:new Date().getTime(),
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              cache:{
 | 
				
			||||||
 | 
					                registry:'localhost:5000/',
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              tags:[],
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            docker.cache.name = `${docker.image.name}:${docker.image.prefix}buildcache${docker.image.suffix}`;
 | 
				
			||||||
 | 
					            docker.cache.grype = `${docker.cache.registry}${docker.image.name}:${docker.image.prefix}grype${docker.image.suffix}`;
 | 
				
			||||||
 | 
					            docker.app.prefix = docker.image.prefix;
 | 
				
			||||||
 | 
					            docker.app.suffix = docker.image.suffix;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // setup tags
 | 
				
			||||||
 | 
					              if(opt.input?.etc?.dockerfile !== 'arch.dockerfile' && opt.input?.etc?.tag){
 | 
				
			||||||
 | 
					                docker.image.tags.push(`${context.sha.substring(0,7)}`);
 | 
				
			||||||
 | 
					                docker.image.tags.push(opt.input.etc.tag);
 | 
				
			||||||
 | 
					                docker.image.tags.push(`${opt.input.etc.tag}-${docker.app.version}`);
 | 
				
			||||||
 | 
					                docker.cache.name = `${docker.image.name}:buildcache-${opt.input.etc.tag}`;
 | 
				
			||||||
 | 
					              }else if(opt.dot?.semver?.version){
 | 
				
			||||||
 | 
					                const semver = opt.dot.semver.version.split('.');
 | 
				
			||||||
 | 
					                docker.image.tags.push(`${context.sha.substring(0,7)}`);
 | 
				
			||||||
 | 
					                if(Array.isArray(semver)){
 | 
				
			||||||
 | 
					                  if(semver.length >= 1) docker.image.tags.push(`${semver[0]}`);
 | 
				
			||||||
 | 
					                  if(semver.length >= 2) docker.image.tags.push(`${semver[0]}.${semver[1]}`);
 | 
				
			||||||
 | 
					                  if(semver.length >= 3) docker.image.tags.push(`${semver[0]}.${semver[1]}.${semver[2]}`);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if(opt.dot.semver?.stable && new RegExp(opt.dot.semver.stable, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('stable');
 | 
				
			||||||
 | 
					                if(opt.dot.semver?.latest && new RegExp(opt.dot.semver.latest, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('latest');
 | 
				
			||||||
 | 
					              }else if(opt.input?.etc?.version && opt.input.etc.version === 'latest'){
 | 
				
			||||||
 | 
					                docker.image.tags.push('latest');
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              for(const tag of docker.image.tags){
 | 
				
			||||||
 | 
					                docker.tags.push(`${docker.image.name}:${docker.image.prefix}${tag}${docker.image.suffix}`);
 | 
				
			||||||
 | 
					                docker.tags.push(`ghcr.io/${docker.image.name}:${docker.image.prefix}${tag}${docker.image.suffix}`);
 | 
				
			||||||
 | 
					                docker.tags.push(`quay.io/${docker.image.name}:${docker.image.prefix}${tag}${docker.image.suffix}`);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // setup build arguments
 | 
				
			||||||
 | 
					              if(opt.input?.etc?.build?.args){
 | 
				
			||||||
 | 
					                for(const arg in opt.input.etc.build.args){
 | 
				
			||||||
 | 
					                  docker.app[arg] = opt.input.etc.build.args[arg];
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              if(opt.dot?.build?.args){
 | 
				
			||||||
 | 
					                for(const arg in opt.dot.build.args){
 | 
				
			||||||
 | 
					                  docker.app[arg] = opt.dot.build.args[arg];
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              const arguments = [];
 | 
				
			||||||
 | 
					              for(const argument in docker.app){
 | 
				
			||||||
 | 
					                arguments.push(`APP_${argument.toUpperCase()}=${docker.app[argument]}`);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // export to environment
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_CACHE_REGISTRY', docker.cache.registry);
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_CACHE_NAME', docker.cache.name);
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_CACHE_GRYPE', docker.cache.grype);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_NAME', docker.image.name);
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_ARCH', docker.image.arch);
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_TAGS', docker.tags.join(','));
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_DESCRIPTION', docker.image.description);
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_ARGUMENTS', arguments.join("\r\n"));
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_DOCKERFILE', opt.input?.etc?.dockerfile || 'arch.dockerfile');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_BUILD', (opt.input?.build === undefined) ? false : opt.input.build);
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_CREATE_RELEASE', (opt.input?.release === undefined) ? false : opt.input.release);
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_CREATE_README', (opt.input?.readme === undefined) ? false : opt.input.readme);
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_GRYPE_FAIL_ON_SEVERITY', (opt.dot?.grype?.fail === undefined) ? true : opt.dot.grype.fail);
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.dot?.grype?.severity || 'high'));
 | 
				
			||||||
 | 
					              if(opt.dot?.readme?.comparison){
 | 
				
			||||||
 | 
					                core.exportVariable('WORKFLOW_CREATE_COMPARISON', true);
 | 
				
			||||||
 | 
					                core.exportVariable('WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE', opt.dot.readme.comparison.image);
 | 
				
			||||||
 | 
					                core.exportVariable('WORKFLOW_CREATE_COMPARISON_IMAGE', `${docker.image.name}:${docker.app.version}`);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # DOCKER    
 | 
				
			||||||
 | 
					      - name: docker / login to hub
 | 
				
			||||||
 | 
					        uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          username: 11notes
 | 
				
			||||||
          password: ${{ secrets.DOCKER_TOKEN }}
 | 
					          password: ${{ secrets.DOCKER_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: github / login to ghcr
 | 
				
			||||||
 | 
					        uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          registry: ghcr.io
 | 
				
			||||||
 | 
					          username: 11notes
 | 
				
			||||||
 | 
					          password: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: quay / login to quay
 | 
				
			||||||
 | 
					        uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          registry: quay.io
 | 
				
			||||||
 | 
					          username: 11notes+github
 | 
				
			||||||
 | 
					          password: ${{ secrets.QUAY_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: docker / setup qemu
 | 
					      - name: docker / setup qemu
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_BUILD == 'true'
 | 
				
			||||||
        uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
 | 
					        uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: docker / setup buildx
 | 
					      - name: docker / setup buildx
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_BUILD == 'true'
 | 
				
			||||||
        uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
 | 
					        uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          driver-opts: network=host
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: grype / build & push
 | 
					      - name: docker / build & push & tag grype
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_BUILD == 'true'
 | 
				
			||||||
 | 
					        id: docker-build
 | 
				
			||||||
        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
					        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          context: .
 | 
					          context: .
 | 
				
			||||||
          file: arch.dockerfile
 | 
					          file: ${{ env.DOCKER_IMAGE_DOCKERFILE }}
 | 
				
			||||||
          push: true
 | 
					          push: true
 | 
				
			||||||
          platforms: ${{ env.IMAGE_ARCH }}
 | 
					          platforms: ${{ env.DOCKER_IMAGE_ARCH }}
 | 
				
			||||||
          cache-from: type=registry,ref=${{ env.json_image }}:buildcache
 | 
					          cache-from: type=registry,ref=${{ env.DOCKER_CACHE_NAME }}
 | 
				
			||||||
          cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
 | 
					          cache-to: type=registry,ref=${{ env.DOCKER_CACHE_REGISTRY }}${{ env.DOCKER_CACHE_NAME }},mode=max,compression=zstd,force-compression=true
 | 
				
			||||||
          build-args: |
 | 
					          build-args: |
 | 
				
			||||||
            APP_IMAGE=${{ env.json_image }}
 | 
					            ${{ env.DOCKER_IMAGE_ARGUMENTS }}
 | 
				
			||||||
            APP_NAME=${{ env.json_name }}
 | 
					 | 
				
			||||||
            APP_VERSION=${{ env.json_version }}
 | 
					 | 
				
			||||||
            APP_ROOT=${{ env.json_root }}
 | 
					 | 
				
			||||||
            APP_UID=${{ env.IMAGE_UID }}
 | 
					 | 
				
			||||||
            APP_GID=${{ env.IMAGE_GID }}
 | 
					 | 
				
			||||||
          tags: |
 | 
					          tags: |
 | 
				
			||||||
            ${{ env.json_image }}:grype
 | 
					            ${{ env.DOCKER_CACHE_GRYPE }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: grype / scan
 | 
					      - name: grype / scan
 | 
				
			||||||
        id: scan
 | 
					        if: env.WORKFLOW_BUILD == 'true'
 | 
				
			||||||
        uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
 | 
					        id: grype
 | 
				
			||||||
 | 
					        uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          image: ${{ env.json_image }}:grype
 | 
					          image: ${{ env.DOCKER_CACHE_GRYPE }}
 | 
				
			||||||
          severity-cutoff: high
 | 
					          fail-build: ${{ env.WORKFLOW_GRYPE_FAIL_ON_SEVERITY }}
 | 
				
			||||||
 | 
					          severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
 | 
				
			||||||
 | 
					          output-format: 'sarif'
 | 
				
			||||||
 | 
					          by-cve: true
 | 
				
			||||||
 | 
					          cache-db: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: grype / delete tag
 | 
					      - name: grype / fail
 | 
				
			||||||
        if: success() || failure()
 | 
					        if: env.WORKFLOW_BUILD == 'true' && (failure() || steps.grype.outcome == 'failure')
 | 
				
			||||||
        run: |
 | 
					        uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
 | 
				
			||||||
          curl --request DELETE \
 | 
					 | 
				
			||||||
            --url https://hub.docker.com/v2/repositories/${{ env.json_image }}/tags/grype/ \
 | 
					 | 
				
			||||||
            --header 'authorization: jwt ${{ secrets.DOCKER_TOKEN }}' \
 | 
					 | 
				
			||||||
            --header 'content-type: application/json' \
 | 
					 | 
				
			||||||
            --fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: grype / report / upload
 | 
					 | 
				
			||||||
        uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          sarif_file: ${{ steps.scan.outputs.sarif }}
 | 
					          image: ${{ env.DOCKER_CACHE_GRYPE }}
 | 
				
			||||||
 | 
					          fail-build: false
 | 
				
			||||||
      - name: grype / report / print
 | 
					          severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
 | 
				
			||||||
        run: cat ${{ steps.scan.outputs.sarif }}
 | 
					          output-format: 'table'
 | 
				
			||||||
 | 
					          by-cve: true
 | 
				
			||||||
 | 
					          cache-db: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: docker / build & push
 | 
					      - name: docker / build & push
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_BUILD == 'true'
 | 
				
			||||||
        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
					        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          context: .
 | 
					          context: .
 | 
				
			||||||
          file: arch.dockerfile
 | 
					          file: ${{ env.DOCKER_IMAGE_DOCKERFILE }}
 | 
				
			||||||
          push: true
 | 
					          push: true
 | 
				
			||||||
          sbom: true
 | 
					          sbom: true
 | 
				
			||||||
          provenance: mode=max
 | 
					          provenance: mode=max
 | 
				
			||||||
          platforms: ${{ env.IMAGE_ARCH }}
 | 
					          platforms: ${{ env.DOCKER_IMAGE_ARCH }}
 | 
				
			||||||
          cache-from: type=registry,ref=${{ env.json_image }}:buildcache
 | 
					          cache-from: type=registry,ref=${{ env.DOCKER_CACHE_REGISTRY }}${{ env.DOCKER_CACHE_NAME }}
 | 
				
			||||||
          cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
 | 
					          cache-to: type=registry,ref=${{ env.DOCKER_CACHE_NAME }},mode=max,compression=zstd,force-compression=true
 | 
				
			||||||
          build-args: |
 | 
					          build-args: |
 | 
				
			||||||
            APP_IMAGE=${{ env.json_image }}
 | 
					            ${{ env.DOCKER_IMAGE_ARGUMENTS }}
 | 
				
			||||||
            APP_NAME=${{ env.json_name }}
 | 
					 | 
				
			||||||
            APP_VERSION=${{ env.json_version }}
 | 
					 | 
				
			||||||
            APP_ROOT=${{ env.json_root }}
 | 
					 | 
				
			||||||
            APP_UID=${{ env.IMAGE_UID }}
 | 
					 | 
				
			||||||
            APP_GID=${{ env.IMAGE_GID }}
 | 
					 | 
				
			||||||
          tags: |
 | 
					          tags: |
 | 
				
			||||||
            ${{ env.IMAGE_TAGS }}
 | 
					            ${{ env.DOCKER_IMAGE_TAGS }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: github / create release notes
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # RELEASE      
 | 
				
			||||||
 | 
					      - name: github / release / log
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        id: git-log
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          LOCAL_LAST_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
 | 
				
			||||||
 | 
					          echo "using last tag: ${LOCAL_LAST_TAG}"
 | 
				
			||||||
 | 
					          LOCAL_COMMITS=$(git log ${LOCAL_LAST_TAG}..HEAD --oneline)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
 | 
				
			||||||
 | 
					          echo "commits<<${EOF}" >> ${GITHUB_OUTPUT}
 | 
				
			||||||
 | 
					          echo "${LOCAL_COMMITS}" >> ${GITHUB_OUTPUT}
 | 
				
			||||||
 | 
					          echo "${EOF}" >> ${GITHUB_OUTPUT}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: github / release / markdown
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_CREATE_RELEASE == 'true'  && steps.git-log.outcome == 'success'
 | 
				
			||||||
 | 
					        id: git-release
 | 
				
			||||||
 | 
					        uses: 11notes/action-docker-release@v1
 | 
				
			||||||
 | 
					        # WHY IS THIS ACTION NOT SHA256 PINNED? SECURITY MUCH?!?!?!
 | 
				
			||||||
 | 
					        # ---------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					        # the next step "github / release / create" creates a new release based on the code
 | 
				
			||||||
 | 
					        # in the repo. This code is not modified and can't be modified by this action.
 | 
				
			||||||
 | 
					        # It does create the markdown for the release, which could be abused, but to what
 | 
				
			||||||
 | 
					        # extend? Adding a link to a malicious repo?
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          git_log: ${{ steps.git-log.outputs.commits }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: github / release / create
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_CREATE_RELEASE == 'true' && steps.git-release.outcome == 'success'
 | 
				
			||||||
 | 
					        uses: actions/create-release@4c11c9fe1dcd9636620a16455165783b20fc7ea0
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
					          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
        run: gh release create ${{ github.ref_name }} -F RELEASE.md
 | 
					        with:
 | 
				
			||||||
 | 
					          tag_name: ${{ github.ref }}
 | 
				
			||||||
 | 
					          release_name: ${{ github.ref }}
 | 
				
			||||||
 | 
					          body: ${{ steps.git-release.outputs.release }}
 | 
				
			||||||
 | 
					          draft: false
 | 
				
			||||||
 | 
					          prerelease: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # LICENSE
 | 
				
			||||||
 | 
					      - name: license / update year
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          script: |
 | 
				
			||||||
 | 
					            const { existsSync, readFileSync, writeFileSync } = require('node:fs');
 | 
				
			||||||
 | 
					            const { resolve } = require('node:path');
 | 
				
			||||||
 | 
					            const file = 'LICENSE';
 | 
				
			||||||
 | 
					            const year = new Date().getFullYear();
 | 
				
			||||||
 | 
					            try{
 | 
				
			||||||
 | 
					              const path = resolve(file);
 | 
				
			||||||
 | 
					              if(existsSync(path)){
 | 
				
			||||||
 | 
					                let license = readFileSync(file).toString();
 | 
				
			||||||
 | 
					                if(!new RegExp(`Copyright \\(c\\) ${year} 11notes`, 'i').test(license)){
 | 
				
			||||||
 | 
					                  license = license.replace(/Copyright \(c\) \d{4} /i, `Copyright (c) ${new Date().getFullYear()} `);
 | 
				
			||||||
 | 
					                  writeFileSync(path, license);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }else{
 | 
				
			||||||
 | 
					                throw new Error(`file ${file} does not exist`);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }catch(e){
 | 
				
			||||||
 | 
					              core.setFailed(e);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # README
 | 
				
			||||||
 | 
					      - name: github / checkout HEAD
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        run: |     
 | 
				
			||||||
 | 
					          git checkout HEAD
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: docker / setup comparison images
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_CREATE_COMPARISON == 'true'
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        run: |    
 | 
				
			||||||
 | 
					          docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}
 | 
				
			||||||
 | 
					          docker image ls --filter "reference=${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}" --format json | jq --raw-output '.Size' &> ./comparison.size0.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}
 | 
				
			||||||
 | 
					          docker image ls --filter "reference=${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}" --format json | jq --raw-output '.Size' &> ./comparison.size1.log
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          docker run --entrypoint "/bin/sh" --rm ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }} -c id &> ./comparison.id.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: github / create README.md
 | 
				
			||||||
 | 
					        id: github-readme
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_CREATE_README == 'true'
 | 
				
			||||||
 | 
					        uses: 11notes/action-docker-readme@v1
 | 
				
			||||||
 | 
					        # WHY IS THIS ACTION NOT SHA256 PINNED? SECURITY MUCH?!?!?!
 | 
				
			||||||
 | 
					        # ---------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					        # the next step "github / commit & push" only adds the README and LICENSE as well as 
 | 
				
			||||||
 | 
					        # compose.yaml to the repository. This does not pose a security risk if this action
 | 
				
			||||||
 | 
					        # would be compromised. The code of the app can't be changed by this action. Since
 | 
				
			||||||
 | 
					        # only the files mentioned are commited to the repo. Sure, someone could make a bad
 | 
				
			||||||
 | 
					        # compose.yaml, but since this serves only as an example I see no harm in that.
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          sarif_file: ${{ steps.grype.outputs.sarif }}
 | 
				
			||||||
 | 
					          build_output_metadata: ${{ steps.docker-build.outputs.metadata }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: docker / push README.md to docker hub
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        if: steps.github-readme.outcome == 'success' && hashFiles('README_NONGITHUB.md') != ''
 | 
				
			||||||
 | 
					        uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          DOCKER_USER: 11notes
 | 
				
			||||||
 | 
					          DOCKER_PASS: ${{ secrets.DOCKER_TOKEN }}
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          destination_container_repo: ${{ env.DOCKER_IMAGE_NAME }}
 | 
				
			||||||
 | 
					          provider: dockerhub
 | 
				
			||||||
 | 
					          short_description: ${{ env.DOCKER_IMAGE_DESCRIPTION }}
 | 
				
			||||||
 | 
					          readme_file: 'README_NONGITHUB.md'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: github / commit & push
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        if: steps.github-readme.outcome == 'success' && hashFiles('README.md') != ''
 | 
				
			||||||
 | 
					        run: |         
 | 
				
			||||||
 | 
					          git config user.name "github-actions[bot]"
 | 
				
			||||||
 | 
					          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
 | 
				
			||||||
 | 
					          git add README.md
 | 
				
			||||||
 | 
					          if [ -f compose.yaml ]; then
 | 
				
			||||||
 | 
					            git add compose.yaml
 | 
				
			||||||
 | 
					          fi
 | 
				
			||||||
 | 
					          if [ -f LICENSE ]; then
 | 
				
			||||||
 | 
					            git add LICENSE
 | 
				
			||||||
 | 
					          fi
 | 
				
			||||||
 | 
					          git commit -m "github-actions[bot]: update README.md"
 | 
				
			||||||
 | 
					          git push origin HEAD:master
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # REPOSITORY SETTINGS
 | 
				
			||||||
      - name: github / update description and set repo defaults
 | 
					      - name: github / update description and set repo defaults
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          curl --request PATCH \
 | 
					          curl --request PATCH \
 | 
				
			||||||
@@ -137,22 +426,11 @@ 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.DOCKER_IMAGE_DESCRIPTION }}",
 | 
				
			||||||
              "homepage":"",
 | 
					              "homepage":"",
 | 
				
			||||||
              "has_issues":true,
 | 
					              "has_issues":true,
 | 
				
			||||||
              "has_discussions":true,
 | 
					              "has_discussions":true,
 | 
				
			||||||
              "has_projects":false,
 | 
					              "has_projects":false,
 | 
				
			||||||
              "has_wiki":false
 | 
					              "has_wiki":false
 | 
				
			||||||
            }' \
 | 
					            }' \
 | 
				
			||||||
            --fail
 | 
					            --fail
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: docker / push README.md to docker hub
 | 
					 | 
				
			||||||
        uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
 | 
					 | 
				
			||||||
        env:
 | 
					 | 
				
			||||||
          DOCKER_USER: ${{ env.DOCKER_USERNAME }}
 | 
					 | 
				
			||||||
          DOCKER_PASS: ${{ secrets.DOCKER_TOKEN }}
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          destination_container_repo: ${{ env.json_image }}
 | 
					 | 
				
			||||||
          provider: dockerhub
 | 
					 | 
				
			||||||
          short_description: ${{ env.json_description }}
 | 
					 | 
				
			||||||
          readme_file: 'README.md'
 | 
					 | 
				
			||||||
							
								
								
									
										16
									
								
								.github/workflows/readme.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/readme.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					name: readme
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  readme:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: update README.md
 | 
				
			||||||
 | 
					        uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          wait-for-completion: false
 | 
				
			||||||
 | 
					          workflow: docker.yml
 | 
				
			||||||
 | 
					          token: "${{ secrets.REPOSITORY_TOKEN }}"
 | 
				
			||||||
 | 
					          inputs: '{ "build":"false", "release":"false", "readme":"true" }'
 | 
				
			||||||
							
								
								
									
										76
									
								
								.github/workflows/tags.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								.github/workflows/tags.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,76 @@
 | 
				
			|||||||
 | 
					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", "readme":"true" }'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  docker-unraid:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:  
 | 
				
			||||||
 | 
					      - name: init / base64 nested json
 | 
				
			||||||
 | 
					        uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          script: |
 | 
				
			||||||
 | 
					            const { Buffer } = require('node:buffer');
 | 
				
			||||||
 | 
					            const etc = {
 | 
				
			||||||
 | 
					              semversuffix:"unraid",
 | 
				
			||||||
 | 
					              uid:99,
 | 
				
			||||||
 | 
					              gid:100,
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            core.exportVariable('WORKFLOW_BASE64JSON', Buffer.from(JSON.stringify(etc)).toString('base64'));
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					      - name: build docker image for unraid community
 | 
				
			||||||
 | 
					        uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          wait-for-completion: false
 | 
				
			||||||
 | 
					          workflow: docker.yml
 | 
				
			||||||
 | 
					          token: "${{ secrets.REPOSITORY_TOKEN }}"
 | 
				
			||||||
 | 
					          inputs: '{ "release":"false", "readme":"false", "run-name":"unraid", "etc":"${{ env.WORKFLOW_BASE64JSON }}" }'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  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", "readme":"true" }'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  kms-gui-unraid:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    needs: docker-unraid
 | 
				
			||||||
 | 
					    steps:   
 | 
				
			||||||
 | 
					      - name: init / base64 nested json
 | 
				
			||||||
 | 
					        uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          script: |
 | 
				
			||||||
 | 
					            const { Buffer } = require('node:buffer');
 | 
				
			||||||
 | 
					            const etc = {
 | 
				
			||||||
 | 
					              semversuffix:"unraid",
 | 
				
			||||||
 | 
					              uid:99,
 | 
				
			||||||
 | 
					              gid:100,
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            core.exportVariable('WORKFLOW_BASE64JSON', Buffer.from(JSON.stringify(etc)).toString('base64'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - 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", "readme":"false", "run-name":"unraid", "etc":"${{ env.WORKFLOW_BASE64JSON }}" }'
 | 
				
			||||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,2 +1,3 @@
 | 
				
			|||||||
 | 
					# default
 | 
				
			||||||
maintain/
 | 
					maintain/
 | 
				
			||||||
project*
 | 
					node_modules/
 | 
				
			||||||
							
								
								
									
										17
									
								
								.json
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								.json
									
									
									
									
									
								
							@@ -1,10 +1,19 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "image":"11notes/kms",
 | 
					  "image":"11notes/kms",
 | 
				
			||||||
  "description":"Activate any version of Windows and Office, forever",
 | 
					 | 
				
			||||||
  "name":"kms",
 | 
					  "name":"kms",
 | 
				
			||||||
  "version":"646f476",
 | 
					 | 
				
			||||||
  "root":"/kms",
 | 
					  "root":"/kms",
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  "stable":"646f476",
 | 
					  "semver":{
 | 
				
			||||||
  "parent":"11notes/alpine:stable"
 | 
					    "version":"1.0.0"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  "readme":{
 | 
				
			||||||
 | 
					    "description":"Activate any version of Windows and Office, forever",
 | 
				
			||||||
 | 
					    "parent":{
 | 
				
			||||||
 | 
					      "image":"11notes/alpine:stable"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "built":{
 | 
				
			||||||
 | 
					      "11notes/py-kms":"https://github.com/11notes/fork-py-kms"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					MIT License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2025 11notes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 | 
					in the Software without restriction, including without limitation the rights
 | 
				
			||||||
 | 
					to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
				
			||||||
 | 
					copies of the Software, and to permit persons to whom the Software is
 | 
				
			||||||
 | 
					furnished to do so, subject to the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright notice and this permission notice shall be included in all
 | 
				
			||||||
 | 
					copies or substantial portions of the Software.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
				
			||||||
 | 
					IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
				
			||||||
 | 
					FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
				
			||||||
 | 
					AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
				
			||||||
 | 
					LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
				
			||||||
 | 
					OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
				
			||||||
 | 
					SOFTWARE.
 | 
				
			||||||
							
								
								
									
										87
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										87
									
								
								README.md
									
									
									
									
									
								
							@@ -1,14 +1,16 @@
 | 
				
			|||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 🏔️ kms on Alpine
 | 
					# KMS
 | 
				
			||||||
[<img src="https://img.shields.io/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-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/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-KMS)[<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**
 | 
					Activate any version of Windows and Office, forever
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 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 
 | 
				
			||||||
@@ -39,39 +41,44 @@ Works with:
 | 
				
			|||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
name: "kms"
 | 
					name: "kms"
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
  kms:
 | 
					  app:
 | 
				
			||||||
    image: "11notes/kms:646f476"
 | 
					    image: "11notes/kms:1.0.0"
 | 
				
			||||||
    container_name: "kms"
 | 
					 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: "Europe/Zurich"
 | 
					      TZ: "Europe/Zurich"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - "var:/kms/var"
 | 
					      - "var:/kms/var"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "1688:1688/tcp"
 | 
					      - "1688:1688/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: "always"
 | 
				
			||||||
  kms-gui:
 | 
					
 | 
				
			||||||
    image: "11notes/kms-gui:latest"
 | 
					  gui:
 | 
				
			||||||
    container_name: "kms-gui"
 | 
					    image: "11notes/kms-gui:1.0.0"
 | 
				
			||||||
 | 
					    depends_on:
 | 
				
			||||||
 | 
					      app:
 | 
				
			||||||
 | 
					        condition: "service_healthy"
 | 
				
			||||||
 | 
					        restart: true
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: "Europe/Zurich"
 | 
					      TZ: "Europe/Zurich"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - "var:/kms/var"
 | 
					      - "var:/kms/var"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "8080:8080/tcp"
 | 
					      - "3000:3000/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: "always"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
volumes:
 | 
					volumes:
 | 
				
			||||||
  var:
 | 
					  var:
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# EXAMPLE
 | 
				
			||||||
## Windows Server 2025 Datacenter. List of [GVLK](https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys)
 | 
					## Windows Server 2025 Datacenter. List of [GVLK](https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys)
 | 
				
			||||||
```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"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -Name "KeyManagementServiceName" -Value "KMS_IP"
 | 
					Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -Name "KeyManagementServiceName" -Value "KMS_IP"
 | 
				
			||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -Name "KeyManagementServicePort" -Value "KMS_PORT"
 | 
					Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -Name "KeyManagementServicePort" -Value "KMS_PORT"
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
@@ -93,29 +100,51 @@ slmgr /ato
 | 
				
			|||||||
| Parameter | Value | Default |
 | 
					| Parameter | Value | Default |
 | 
				
			||||||
| --- | --- | --- |
 | 
					| --- | --- | --- |
 | 
				
			||||||
| `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` | Show debug messages from image **not** app | |
 | 
					| `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 | 25 |
 | 
					| `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) |
 | 
				
			||||||
| `KMS_RENEWALINTERVAL` | re-activation after N minutes | 259200 (180 days) |
 | 
					| `KMS_RENEWALINTERVAL` | re-activation after N minutes | 259200 (180 days) |
 | 
				
			||||||
| `KMS_LOGLEVEL` | CRITICAL, ERROR, WARNING, INFO, DEBUG, MININFO | INFO |
 | 
					| `KMS_LOGLEVEL` | CRITICAL, ERROR, WARNING, INFO, DEBUG, MININFO | INFO |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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.0](https://hub.docker.com/r/11notes/kms/tags?name=1.0.0)
 | 
				
			||||||
 | 
					* [1.0.0-unraid](https://hub.docker.com/r/11notes/kms/tags?name=1.0.0-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.0``` 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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# REGISTRIES ☁️
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					docker pull 11notes/kms:1.0.0
 | 
				
			||||||
 | 
					docker pull ghcr.io/11notes/kms:1.0.0
 | 
				
			||||||
 | 
					docker pull quay.io/11notes/kms:1.0.0
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ title_unraid }}
 | 
				
			||||||
 | 
					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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# SOURCE 💾
 | 
					# SOURCE 💾
 | 
				
			||||||
* [11notes/kms](https://github.com/11notes/docker-kms)
 | 
					* [11notes/kms](https://github.com/11notes/docker-KMS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# PARENT IMAGE 🏛️
 | 
					# PARENT IMAGE 🏛️
 | 
				
			||||||
* [11notes/alpine:stable](https://hub.docker.com/r/11notes/alpine)
 | 
					* [11notes/alpine:stable](https://hub.docker.com/r/11notes/alpine)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# BUILT WITH 🧰
 | 
					# BUILT WITH 🧰
 | 
				
			||||||
* [py-kms](https://github.com/Py-KMS-Organization/py-kms)
 | 
					* [11notes/py-kms](https://github.com/11notes/fork-py-kms)
 | 
				
			||||||
* [alpine](https://alpinelinux.org)
 | 
					* [11notes/util](https://github.com/11notes/docker-util)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TIPS 📌
 | 
					# GENERAL TIPS 📌
 | 
				
			||||||
* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS with a valid certificate
 | 
					> [!TIP]
 | 
				
			||||||
* Use Let’s Encrypt certificates to protect your SSL endpoints
 | 
					>* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
 | 
				
			||||||
 | 
					>* 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
 | 
				
			||||||
* [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 web 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).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*created 05.05.2025, 11:03:41 (CET)*
 | 
				
			||||||
@@ -1,2 +0,0 @@
 | 
				
			|||||||
### 🪄 Features
 | 
					 | 
				
			||||||
* switch to new github workflow and build process
 | 
					 | 
				
			||||||
@@ -1,37 +1,20 @@
 | 
				
			|||||||
 | 
					ARG APP_UID=1000
 | 
				
			||||||
 | 
					ARG APP_GID=1000
 | 
				
			||||||
 | 
					ARG BUILD_ROOT=/git/fork-py-kms
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Util
 | 
					# :: Util
 | 
				
			||||||
  FROM alpine AS util
 | 
					  FROM 11notes/util AS util
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  RUN set -ex; \
 | 
					# :: Build / py-kms
 | 
				
			||||||
    apk --no-cache --update add \
 | 
					  FROM alpine/git AS build
 | 
				
			||||||
      git; \
 | 
					 | 
				
			||||||
    git clone https://github.com/11notes/docker-util.git;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# :: Build / redis
 | 
					 | 
				
			||||||
  FROM python:3.12-alpine AS build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ARG TARGETARCH
 | 
					 | 
				
			||||||
  ARG APP_VERSION
 | 
					  ARG APP_VERSION
 | 
				
			||||||
 | 
					  ARG BUILD_ROOT
 | 
				
			||||||
  USER root
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  RUN set -ex; \
 | 
					  RUN set -ex; \
 | 
				
			||||||
    apk --update --no-cache add \
 | 
					    git clone https://github.com/11notes/fork-py-kms -b next; \
 | 
				
			||||||
      curl \
 | 
					    cd ${BUILD_ROOT}; \
 | 
				
			||||||
      wget \
 | 
					    git checkout v${APP_VERSION}; \
 | 
				
			||||||
      unzip \
 | 
					    cp -R ${BUILD_ROOT}/docker/docker-py3-kms-minimal/requirements.txt ${BUILD_ROOT}/py-kms/requirements.txt; \
 | 
				
			||||||
      build-base \
 | 
					    cp -R ${BUILD_ROOT}/docker/docker-py3-kms/requirements.txt ${BUILD_ROOT}/py-kms/requirements.gui.txt;
 | 
				
			||||||
      linux-headers \ 
 | 
					 | 
				
			||||||
      make \
 | 
					 | 
				
			||||||
      cmake \
 | 
					 | 
				
			||||||
      g++ \
 | 
					 | 
				
			||||||
      git; \
 | 
					 | 
				
			||||||
    pip3 install --upgrade pip; \
 | 
					 | 
				
			||||||
    pip3 install pyinstaller; \
 | 
					 | 
				
			||||||
    git clone https://github.com/Py-KMS-Organization/py-kms.git; \
 | 
					 | 
				
			||||||
    cd /py-kms/py-kms; \
 | 
					 | 
				
			||||||
    git checkout ${APP_VERSION}; \
 | 
					 | 
				
			||||||
    pyinstaller --onefile pykms_Server.py; \
 | 
					 | 
				
			||||||
    cp /py-kms/py-kms/dist/pykms_Server /usr/local/bin;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Header
 | 
					# :: Header
 | 
				
			||||||
  FROM 11notes/alpine:stable
 | 
					  FROM 11notes/alpine:stable
 | 
				
			||||||
@@ -42,6 +25,16 @@
 | 
				
			|||||||
    ARG APP_NAME
 | 
					    ARG APP_NAME
 | 
				
			||||||
    ARG APP_VERSION
 | 
					    ARG APP_VERSION
 | 
				
			||||||
    ARG APP_ROOT
 | 
					    ARG APP_ROOT
 | 
				
			||||||
 | 
					    ARG APP_UID
 | 
				
			||||||
 | 
					    ARG APP_GID
 | 
				
			||||||
 | 
					    ARG APP_NO_CACHE
 | 
				
			||||||
 | 
					    ARG BUILD_ROOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # :: python image
 | 
				
			||||||
 | 
					      ARG PIP_ROOT_USER_ACTION=ignore
 | 
				
			||||||
 | 
					      ARG PIP_BREAK_SYSTEM_PACKAGES=1
 | 
				
			||||||
 | 
					      ARG PIP_DISABLE_PIP_VERSION_CHECK=1
 | 
				
			||||||
 | 
					      ARG PIP_NO_CACHE_DIR=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: environment
 | 
					  # :: environment
 | 
				
			||||||
    ENV APP_IMAGE=${APP_IMAGE}
 | 
					    ENV APP_IMAGE=${APP_IMAGE}
 | 
				
			||||||
@@ -49,43 +42,52 @@
 | 
				
			|||||||
    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=25
 | 
					    ENV KMS_CLIENTCOUNT=26
 | 
				
			||||||
    ENV KMS_ACTIVATIONINTERVAL=120
 | 
					    ENV KMS_ACTIVATIONINTERVAL=120
 | 
				
			||||||
    ENV KMS_RENEWALINTERVAL=259200
 | 
					    ENV KMS_RENEWALINTERVAL=259200
 | 
				
			||||||
    ENV KMS_LOGLEVEL="INFO"
 | 
					    ENV KMS_LOGLEVEL="INFO"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: multi-stage
 | 
					  # :: multi-stage
 | 
				
			||||||
    COPY --from=util /docker-util/src/ /usr/local/bin
 | 
					    COPY --from=util /usr/local/bin /usr/local/bin
 | 
				
			||||||
    COPY --from=build /usr/local/bin/ /usr/local/bin
 | 
					    COPY --from=build ${BUILD_ROOT}/py-kms /opt/py-kms
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: Run
 | 
					# :: Run
 | 
				
			||||||
  USER root
 | 
					  USER root
 | 
				
			||||||
 | 
					  RUN eleven printenv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: install application
 | 
					  # :: install application
 | 
				
			||||||
    RUN set -ex; \
 | 
					    RUN set -ex; \
 | 
				
			||||||
      apk --no-cache --update add \
 | 
					      apk --no-cache --update add \
 | 
				
			||||||
        python3=3.12.8-r1;
 | 
					        python3; \
 | 
				
			||||||
 | 
					      apk --no-cache --update --virtual .build add \
 | 
				
			||||||
 | 
					        py3-pip;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    RUN set -ex; \
 | 
					    RUN set -ex; \
 | 
				
			||||||
      mkdir -p ${APP_ROOT}/var; \
 | 
					      mkdir -p ${APP_ROOT}/var; \
 | 
				
			||||||
      touch /var/log/kms.log; \
 | 
					      pip3 install -r /opt/py-kms/requirements.txt; \
 | 
				
			||||||
      ln -sf /dev/stdout /var/log/kms.log;
 | 
					      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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: copy filesystem changes and set correct permissions
 | 
					  # :: copy filesystem changes and set correct permissions
 | 
				
			||||||
    COPY ./rootfs /
 | 
					    COPY ./rootfs /
 | 
				
			||||||
    RUN set -ex; \
 | 
					    RUN set -ex; \
 | 
				
			||||||
      chmod +x -R /usr/local/bin; \
 | 
					      chmod +x -R /usr/local/bin; \
 | 
				
			||||||
      chown -R 1000:1000 \
 | 
					      chown -R ${APP_UID}:${APP_GID} \
 | 
				
			||||||
        ${APP_ROOT};
 | 
					        ${APP_ROOT} \
 | 
				
			||||||
 | 
					        /opt/py-kms;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # :: support unraid
 | 
				
			||||||
 | 
					    RUN set -ex; \
 | 
				
			||||||
 | 
					      eleven unraid
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Volumes
 | 
					# :: Volumes
 | 
				
			||||||
  VOLUME ["${APP_ROOT}/var"]
 | 
					  VOLUME ["${APP_ROOT}/var"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Monitor
 | 
					# :: Monitor
 | 
				
			||||||
  HEALTHCHECK --interval=5s --timeout=2s CMD /usr/local/bin/healthcheck.sh || exit 1
 | 
					  HEALTHCHECK --interval=5s --timeout=2s CMD netstat -an | grep -q 1688 || exit 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Start
 | 
					# :: Start
 | 
				
			||||||
  USER docker
 | 
					  USER ${APP_UID}:${APP_GID}
 | 
				
			||||||
							
								
								
									
										22
									
								
								compose.yaml
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								compose.yaml
									
									
									
									
									
								
							@@ -1,24 +1,28 @@
 | 
				
			|||||||
name: "kms"
 | 
					name: "kms"
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
  kms:
 | 
					  app:
 | 
				
			||||||
    image: "11notes/kms:646f476"
 | 
					    image: "11notes/kms:1.0.0"
 | 
				
			||||||
    container_name: "kms"
 | 
					 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: "Europe/Zurich"
 | 
					      TZ: "Europe/Zurich"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - "var:/kms/var"
 | 
					      - "var:/kms/var"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "1688:1688/tcp"
 | 
					      - "1688:1688/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: "always"
 | 
				
			||||||
  kms-gui:
 | 
					
 | 
				
			||||||
    image: "11notes/kms-gui:latest"
 | 
					  gui:
 | 
				
			||||||
    container_name: "kms-gui"
 | 
					    image: "11notes/kms-gui:1.0.0"
 | 
				
			||||||
 | 
					    depends_on:
 | 
				
			||||||
 | 
					      app:
 | 
				
			||||||
 | 
					        condition: "service_healthy"
 | 
				
			||||||
 | 
					        restart: true
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: "Europe/Zurich"
 | 
					      TZ: "Europe/Zurich"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - "var:/kms/var"
 | 
					      - "var:/kms/var"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "8080:8080/tcp"
 | 
					      - "3000:3000/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: "always"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
volumes:
 | 
					volumes:
 | 
				
			||||||
  var:
 | 
					  var:
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								img/Office.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/Office.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								img/Windows11ENTLTSC.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/Windows11ENTLTSC.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 62 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								img/WindowsSRV2025.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/WindowsSRV2025.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 49 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								img/webGUICustomIcon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/webGUICustomIcon.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 38 KiB  | 
							
								
								
									
										71
									
								
								project.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								project.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_synopsis }} This image will run a KMS server you can use to activate any version of Windows and Office, forever.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Works with:
 | 
				
			||||||
 | 
					- Windows Vista 
 | 
				
			||||||
 | 
					- Windows 7 
 | 
				
			||||||
 | 
					- Windows 8
 | 
				
			||||||
 | 
					- Windows 8.1
 | 
				
			||||||
 | 
					- Windows 10
 | 
				
			||||||
 | 
					- Windows 11
 | 
				
			||||||
 | 
					- Windows Server 2008
 | 
				
			||||||
 | 
					- Windows Server 2008 R2
 | 
				
			||||||
 | 
					- Windows Server 2012
 | 
				
			||||||
 | 
					- Windows Server 2012 R2
 | 
				
			||||||
 | 
					- Windows Server 2016
 | 
				
			||||||
 | 
					- Windows Server 2019
 | 
				
			||||||
 | 
					- Windows Server 2022
 | 
				
			||||||
 | 
					- Windows Server 2025
 | 
				
			||||||
 | 
					- Microsoft Office 2010 ( Volume License )
 | 
				
			||||||
 | 
					- Microsoft Office 2013 ( Volume License )
 | 
				
			||||||
 | 
					- Microsoft Office 2016 ( Volume License )
 | 
				
			||||||
 | 
					- Microsoft Office 2019 ( Volume License )
 | 
				
			||||||
 | 
					- Microsoft Office 2021 ( Volume License )
 | 
				
			||||||
 | 
					- Microsoft Office 2024 ( Volume License )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ title_volumes }}
 | 
				
			||||||
 | 
					* **${{ json_root }}/var** - Directory of the activation database
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_compose }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# EXAMPLE
 | 
				
			||||||
 | 
					## Windows Server 2025 Datacenter. List of [GVLK](https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys)
 | 
				
			||||||
 | 
					```cmd
 | 
				
			||||||
 | 
					slmgr /ipk D764K-2NDRG-47T6Q-P8T8W-YP6DF
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					Add your KMS server information to server via registry
 | 
				
			||||||
 | 
					```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 "KeyManagementServicePort" -Value "KMS_PORT"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -Name "KeyManagementServiceName" -Value "KMS_IP"
 | 
				
			||||||
 | 
					Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -Name "KeyManagementServicePort" -Value "KMS_PORT"
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					Activate server
 | 
				
			||||||
 | 
					```cmd
 | 
				
			||||||
 | 
					slmgr /ato
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_defaults }}
 | 
				
			||||||
 | 
					| `database` | /kms/var/kms.db | SQlite database holding all client data |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_environment }}
 | 
				
			||||||
 | 
					| `KMS_LOCALE` | see Microsoft LICD specification | 1033 (en-US) |
 | 
				
			||||||
 | 
					| `KMS_CLIENTCOUNT` | client count > 25 | 26 |
 | 
				
			||||||
 | 
					| `KMS_ACTIVATIONINTERVAL` | Retry unsuccessful after N minutes | 120 (2 hours) |
 | 
				
			||||||
 | 
					| `KMS_RENEWALINTERVAL` | re-activation after N minutes | 259200 (180 days) |
 | 
				
			||||||
 | 
					| `KMS_LOGLEVEL` | CRITICAL, ERROR, WARNING, INFO, DEBUG, MININFO | INFO |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_source }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_parent }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_built }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ content_tips }}
 | 
				
			||||||
 | 
					* 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)
 | 
				
			||||||
 | 
					* Use [11notes/kms-gui](https://github.com/11notes/docker-kms-gui) if you want to see the clients you activated in a nice web GUI
 | 
				
			||||||
@@ -1,9 +1,16 @@
 | 
				
			|||||||
#!/bin/ash
 | 
					#!/bin/ash
 | 
				
			||||||
  if [ -z "${1}" ]; then
 | 
					  if [ -z "${1}" ]; then
 | 
				
			||||||
    eleven log start
 | 
					
 | 
				
			||||||
    set -- "pykms_Server" \
 | 
					    if [ ! -z "${DEBUG}" ]; then
 | 
				
			||||||
      ${KMS_IP} \
 | 
					      KMS_LOGLEVEL="DEBUG"
 | 
				
			||||||
      ${KMS_PORT} \
 | 
					      eleven log debug "setting kms log level to DEBUG"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cd /opt/py-kms
 | 
				
			||||||
 | 
					    set -- "python3" \
 | 
				
			||||||
 | 
					      pykms_Server.py \
 | 
				
			||||||
 | 
					      0.0.0.0 \
 | 
				
			||||||
 | 
					      1688 \
 | 
				
			||||||
      -l ${KMS_LOCALE} \
 | 
					      -l ${KMS_LOCALE} \
 | 
				
			||||||
      -c ${KMS_CLIENTCOUNT} \
 | 
					      -c ${KMS_CLIENTCOUNT} \
 | 
				
			||||||
      -a ${KMS_ACTIVATIONINTERVAL} \
 | 
					      -a ${KMS_ACTIVATIONINTERVAL} \
 | 
				
			||||||
@@ -11,8 +18,10 @@
 | 
				
			|||||||
      -s /kms/var/kms.db \
 | 
					      -s /kms/var/kms.db \
 | 
				
			||||||
      -w RANDOM \
 | 
					      -w RANDOM \
 | 
				
			||||||
      -V ${KMS_LOGLEVEL} \
 | 
					      -V ${KMS_LOGLEVEL} \
 | 
				
			||||||
      -F /var/log/kms.log \
 | 
					      -F STDOUT \
 | 
				
			||||||
      -y
 | 
					      -y
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    eleven log start
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  exec "$@"
 | 
					  exec "$@"
 | 
				
			||||||
@@ -1,2 +0,0 @@
 | 
				
			|||||||
#!/bin/ash
 | 
					 | 
				
			||||||
  netstat -an | grep -q ${KMS_PORT}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user