Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
ProGet container timezone
-
Hi Support,
Wondering if there is a way to set the timezone of the ProGet container when running on docker?
I tried to use the following two environment variables in my docker swarm file but they don't seem to work:
SET_CONTAINER_TIMEZONE: "true" CONTAINER_TIMEZONE: America/Vancouver
The docker container shows UTC as it's current timezone:
Thanks
Simon
-
Hi All,
After posting this I managed to fix the issue by mapping the /etc/localtime file on the host to the container using a volume mount. Like this:
volumes: - "/etc/localtime:/etc/localtime"
However it would be nice if timezone could be specified using a "TZ:" environment variable.
However I do believe you would need to include the "tzdata" application in the ProGet container image to make that work. Would that be possible?
Thanks
Simon
-
hi Simon, not too familiar with usage of
tzdata
orTZ:
variables; do you have examples of how these get used or added in containers, especially when we rely on system-provided time. I can make a suggestion to the product team, if it's easy.
-
Hi @atripp
It looks like you guys are using a Debian based container image. Therefore you would just need to add the following to your dockerfile to install tzdata on the image.
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
Users (like myself) could then use something like the following to add a timezone environment variable to the docker run command:
docker run -d -v proget-packages:/var/proget/packages -p 80:80 --net=proget \ --name=proget --restart=unless-stopped -e PROGET_DB_TYPE=SqlServer \ -e SQL_CONNECTION_STRING='Data Source=proget-sql; Initial Catalog=ProGet; User ID=sa; Password=‹YourStrong!Passw0rd›' TZ='Europe/London' \ proget.inedo.com/productimages/inedo/proget:<version>
Thanks
Simon
-
Hi Simon,
Thanks - we'll include tzdata in the image starting with ProGet 5.3.7, scheduled for release on July 17.
-
Hi @gdivis
I can confirm that TimeZone can now be specified as an environment variable in ProGet 5.3.7
Thanks for including this!
Simon