Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    6 Posts 3 Posters 26 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      scroak_6473
      last edited by

      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:

      905b815d-19a3-4028-b0f9-e58605907093-image.png

      Thanks

      Simon

      1 Reply Last reply Reply Quote 0
      • S Offline
        scroak_6473
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • atrippA Offline
          atripp inedo-engineer
          last edited by

          hi Simon, not too familiar with usage of tzdata or TZ: 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.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            scroak_6473 @atripp
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • gdivisG Offline
              gdivis inedo-engineer
              last edited by

              Hi Simon,

              Thanks - we'll include tzdata in the image starting with ProGet 5.3.7, scheduled for release on July 17.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                scroak_6473 @gdivis
                last edited by

                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

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation