mirror of
				https://github.com/11notes/docker-kms.git
				synced 2025-10-31 12:03:48 +00:00 
			
		
		
		
	Compare commits
	
		
			11 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | abf8bacdb1 | ||
|  | 6896f7af81 | ||
|  | 08eb107dbe | ||
|  | 12d475a9bf | ||
|  | 63923d266c | ||
|  | 57a7806590 | ||
|  | fdb14fa9a8 | ||
|  | 1e7ec66f87 | ||
|  | f69b4b2667 | ||
|  | 5f3c446be5 | ||
|  | a5c9b72fa9 | 
							
								
								
									
										2
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							| @@ -77,6 +77,7 @@ jobs: | |||||||
|             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) | ||||||
|           tags: | |           tags: | | ||||||
|             ${{ env.json_image }}:grype |             ${{ env.json_image }}:grype | ||||||
|  |  | ||||||
| @@ -122,6 +123,7 @@ jobs: | |||||||
|             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) | ||||||
|           tags: | |           tags: | | ||||||
|             ${{ env.IMAGE_TAGS }} |             ${{ env.IMAGE_TAGS }} | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | |||||||
|  | MIT License | ||||||
|  |  | ||||||
|  | Copyright (c) 2020 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. | ||||||
| @@ -1,6 +1,8 @@ | |||||||
| # :: Util | # :: Util | ||||||
|   FROM alpine AS util |   FROM alpine AS util | ||||||
|  |  | ||||||
|  |   ARG NO_CACHE | ||||||
|  |  | ||||||
|   RUN set -ex; \ |   RUN set -ex; \ | ||||||
|     apk --no-cache --update add \ |     apk --no-cache --update add \ | ||||||
|       git; \ |       git; \ | ||||||
| @@ -16,22 +18,12 @@ | |||||||
|  |  | ||||||
|   RUN set -ex; \ |   RUN set -ex; \ | ||||||
|     apk --update --no-cache add \ |     apk --update --no-cache add \ | ||||||
|       curl \ |  | ||||||
|       wget \ |  | ||||||
|       unzip \ |  | ||||||
|       build-base \ |  | ||||||
|       linux-headers \  |  | ||||||
|       make \ |  | ||||||
|       cmake \ |  | ||||||
|       g++ \ |  | ||||||
|       git; \ |       git; \ | ||||||
|     pip3 install --upgrade pip; \ |     mkdir -p /opt/py-kms; \ | ||||||
|     pip3 install pyinstaller; \ |  | ||||||
|     git clone https://github.com/Py-KMS-Organization/py-kms.git; \ |     git clone https://github.com/Py-KMS-Organization/py-kms.git; \ | ||||||
|     cd /py-kms/py-kms; \ |     cd /py-kms/py-kms; \ | ||||||
|     git checkout ${APP_VERSION}; \ |     git checkout ${APP_VERSION}; \ | ||||||
|     pyinstaller --onefile pykms_Server.py; \ |     cp -R /py-kms/py-kms/* /opt/py-kms; | ||||||
|     cp /py-kms/py-kms/dist/pykms_Server /usr/local/bin; |  | ||||||
|  |  | ||||||
| # :: Header | # :: Header | ||||||
|   FROM 11notes/alpine:stable |   FROM 11notes/alpine:stable | ||||||
| @@ -52,14 +44,14 @@ | |||||||
|     ENV KMS_IP=0.0.0.0 |     ENV KMS_IP=0.0.0.0 | ||||||
|     ENV KMS_PORT=1688 |     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=10080 | ||||||
|     ENV KMS_LOGLEVEL="INFO" |     ENV KMS_LOGLEVEL="INFO" | ||||||
|  |  | ||||||
|   # :: multi-stage |   # :: multi-stage | ||||||
|     COPY --from=util /docker-util/src/ /usr/local/bin |     COPY --from=util /docker-util/src/ /usr/local/bin | ||||||
|     COPY --from=build /usr/local/bin/ /usr/local/bin |     COPY --from=build /opt/py-kms/ /opt/py-kms | ||||||
|  |  | ||||||
|   # :: Run |   # :: Run | ||||||
|   USER root |   USER root | ||||||
| @@ -67,12 +59,18 @@ | |||||||
|   # :: 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=3.12.8-r1; \ | ||||||
|  |       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; \ |       touch /var/log/kms.log; \ | ||||||
|       ln -sf /dev/stdout /var/log/kms.log; |       ln -sf /dev/stdout /var/log/kms.log; \ | ||||||
|  |       pip3 install --no-cache-dir --break-system-packages \ | ||||||
|  |         tzlocal \ | ||||||
|  |         pytz; \ | ||||||
|  |       apk del --no-network .build; | ||||||
|  |  | ||||||
|   # :: copy filesystem changes and set correct permissions |   # :: copy filesystem changes and set correct permissions | ||||||
|     COPY ./rootfs / |     COPY ./rootfs / | ||||||
|   | |||||||
							
								
								
									
										1042
									
								
								rootfs/opt/py-kms/KmsDataBase.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1042
									
								
								rootfs/opt/py-kms/KmsDataBase.xml
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,7 +1,8 @@ | |||||||
| #!/bin/ash | #!/bin/ash | ||||||
|   if [ -z "${1}" ]; then |   if [ -z "${1}" ]; then | ||||||
|     eleven log start |     cd /opt/py-kms | ||||||
|     set -- "pykms_Server" \ |     set -- "python3" \ | ||||||
|  |       pykms_Server.py \ | ||||||
|       ${KMS_IP} \ |       ${KMS_IP} \ | ||||||
|       ${KMS_PORT} \ |       ${KMS_PORT} \ | ||||||
|       -l ${KMS_LOCALE} \ |       -l ${KMS_LOCALE} \ | ||||||
| @@ -13,6 +14,8 @@ | |||||||
|       -V ${KMS_LOGLEVEL} \ |       -V ${KMS_LOGLEVEL} \ | ||||||
|       -F /var/log/kms.log \ |       -F /var/log/kms.log \ | ||||||
|       -y |       -y | ||||||
|  |      | ||||||
|  |     eleven log start | ||||||
|   fi |   fi | ||||||
|  |  | ||||||
|   exec "$@" |   exec "$@" | ||||||
		Reference in New Issue
	
	Block a user