UCS Docker container incorrect system time


#1

I am using the univention/ucs-master-amd64 image from docker hub to test UCS under docker. Install & initial configuration appear fine but nothing samba related appears to work. In troubleshooting that I find that the UCS container system time is 11 hours in advance of host system time. My timezone is Australia/Sydney GMT+11. I can think of various ways to try to workaround this, but just ask the question here to see if anyone else has faced the same issue?

Should the docker container not simply sync it’s time from the host? What would be the best way to configure the UCS container to show actual local time?

Or alternately if this is not the intended behaviour would a bug report be appropriate?

Many thanks.


#2

Ok, have just come across how to pass a timezone environment variable into the container at boot time. Trying that will update soon.


#3

Used the docker run “-e” switch to pass “TZ=Australia/Sydney” to the container but to no avail. Container system time remains 11 hours in advance of the host system :frowning:


#4

Strange, i just tried it and it works for me.
I created a new container with the parameters

“docker run -d --name --hostname= -e domainname= -e nameserver= -e rootpw= -e TZ=Australia/Sydney -p 8011:80 univention/ucs-master-amd64 /sbin/init”

and afterwards connected with

“docker exec -it /bin/bash” and the timezone is set correctly.

Did you wipe the old container completely and create it again?

Regards
Gronkdalonka


#5

Yes, I did create a new container. Can I ask what your host OS is? I’m assuming it’s another UCS 4 instance ?


#6

No i used a Debian as host, but i tried it again with a ucs 4.1-4 as host and the “-e TZ=Australia/Sysdney” parameter is working there as well.


#7

Ok, thanks for the confirmation. I’ve been using a FreeNAS 10 Beta host. I did eventually get the timezone issue sorted out & it seems to have been an issue with the host OS. Appreciate your feedback.