How to set timezone in matlab runtime docker container?
显示 更早的评论
I have used these steps to compile my image: https://www.mathworks.com/help/compiler/package-matlab-standalone-applications-into-docker-images.html
I'm having some trouble setting the timezone in a compiled Docker image.
How to reproduce the problem:
- run the matlab runtime image: docker run --rm -it -e TZ=Asia/Singapore --name mlrt --entrypoint bash matlabruntime/r2024b/release/update0/f00040001040000002
- within the container, running date +'%:z %Z' returns +00:00 Asia when I'm expecting +08:00
What I've tried
Since the base image claims to be based on Ubuntu: https://www.mathworks.com/help/compiler/get-matlab-runtime-container.html
I have tried but failed:
- Setting the TZ environment variable; this usually works for other Ubuntu-based containers.
- timedatectl doesn't work. Source: https://manpages.ubuntu.com/manpages/trusty/en/man1/timedatectl.1.html
Does anyone know how to set it to the correct timezone or could point me to the documentation?
Thanks.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Containers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!