Comments (9)
something like this might be required to define TZ in the entrypoint, still working on it....
#Change timzeone if set
[[ -n ${TZ} ]] && [[ -f /usr/share/zoneinfo/${TZ} ]] && [[ -w /etc/localtime ]] && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime
#use UTC if not
[[ ! -f /etc/localtime ]] && ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
-> #3 (comment)
from py-kms.
well,
That should be ok, provided TZ was defined as env var.
#Change timzeone if set
[[ "DEBUG" == ${LOGLEVEL} ]] && ls -al /etc/localtime
if [[ -n ${TZ} ]] && [[ -f /usr/share/zoneinfo/${TZ} ]]; then
# if file is RO then skip.
if [[ ! -f /etc/localtime ]] || [[ -w /etc/localtime ]]; then
ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime
fi
fi
#use UTC if not
[[ ! -f /etc/localtime ]] && ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
from py-kms.
Hey, could you post the error logs? These are my logs (therefore non-critical):
_mnPad: {12}
mnPad: {b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}
/usr/lib/python3.8/site-packages/tzlocal/unix.py:164: UserWarning: Can not find any timezone configuration, defaulting to UTC.
warnings.warn('Can not find any timezone configuration, defaulting to UTC.')
Wed, 13 Oct 2021 20:07:33 INFO Machine Name: H6kuYYI1nXxaPuxOvbZ1IJS3LD4444fSwHbMuZ5p43G0aN
from py-kms.
kms | mnPad: {b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
kms | 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
kms | 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}
kms |
kms | /usr/lib/python3.9/site-packages/tzlocal/unix.py:164: UserWarning: Can not find any timezone configuration, defaulting to UTC.
kms | warnings.warn('Can not find any timezone configuration, defaulting to UTC.')
kms | Wed, 13 Oct 2021 19:43:45 WARNING With count = 26, activated client could be detected as not genuine !
kms | Wed, 13 Oct 2021 19:43:45 INFO Machine Name: l2i4VortWdGJbbyReaK7tWrKq6jnr
if /etc/localtime is not defined, you have these lines.
As a temporary fix, you can mount your local localtime: -v /etc/localtime:/etc/localtime:ro
the bash snipped should/could be added in the entrypoint when still running as root.( root privileges needed to change /etc/ content)
PS: i'm always using a container to run py-kms.
from py-kms.
I will need to add this as a fix to the Helm chart
from py-kms.
I worked-around it in the base docker image. Please try the newest version and feel free to reopen this issue in case that didn't work.
from py-kms.
Well, it would be nice to have the TZ based on a ENV variable.
from py-kms.
I tried that, but any TZ
var was ignored by the build-in library. Ofc we could try to respect an environment variable in py-kms, so feel free to implement it :)
from py-kms.
I have TZ ok (through env var)+ log for client on stdout.
I try to change now uid/gid of user as I need to have specific id/gid on mounted volume and drop root privileges after having set TZ and UID/GID.. without any luck til now. I might have to split entrypoint in 2. My fork might be already to different from yours.
from py-kms.
Related Issues (20)
- Cant open WebGUI HOT 8
- Make IPv6 support optional HOT 1
- Container does not start HOT 4
- Limit. HOT 1
- Error 0xC004F074 despite successful connection to server HOT 12
- Docker not working HOT 3
- IPv4 [0.0.0.0] can't be dualstack HOT 4
- Recent Change to IPv4 and IPv6 Prevents Activation HOT 2
- Clients unable to activate against Py-KMS HOT 2
- pykms_Client fails to parse command line options correctly HOT 3
- Introduce semantic versioning
- Error 0xC004F074 despite successful connection to server HOT 10
- Add Windows 11 IoT LTSC
- [Docker] Multiple IPs in environment var causes failure to start server when using SQLite HOT 7
- Windows kms error HOT 1
- Server 2022 GVLK Keys not visible in GUI HOT 11
- Docker Container says unhealthy but logs show nothing HOT 4
- py-kms Module 'tzlocal' or 'pytz' not available ! HOT 2
- I am getting activation error 0xC004F074 HOT 2
- Windows 10 LTSC Enterprise keys 2021 missing keys HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-kms.