-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning unable to load '/usr/share/zoneinfo/*' as time zone. Skipping it. #229
Comments
Apparently this can be fixed by installing the tzdata package:
Using an image with this modification instead However, because proper timezone handling may be important, |
I have encountered the same issue when attempting to set the MySQL timezone as UTC on our image.
Is this issue likely to be fixed for a 5.7 image as I'd rather not create & extend our own mysql docker image. Other that the slight increase in the image size, is there any other reason not to install tzdata as part of the standard image? |
The $ docker pull mysql:5.7
5.7: Pulling from library/mysql
Digest: sha256:1a2f9361228e9b10b4c77a651b460828514845dc7ac51735b919c2c4aec864b7
Status: Image is up to date for mysql:5.7
$ docker run --rm mysql:5.7 dpkg -l | grep tzdata
ii tzdata 2017b-0+deb8u1 all time zone and daylight-saving time data Is there actual harm being caused by these warnings? A simple reproducer for issues with MySQL using timezones properly would be appreciated for digging further. |
Closing given lack of additional information for reproduction. |
|
@tianon I think so:
This seems to suggest that all timezone related operations are broken. |
@someonewithpc I think the underlying cause of your issue is not these warnings: $ docker pull mariadb:10.4
10.4: Pulling from library/mariadb
Digest: sha256:379f3689cfcd53fd561c1aa2aea0a336a2362c9d31306528228321344a9cf979
Status: Image is up to date for mariadb:10.4
docker.io/library/mariadb:10.4
$ docker run -dit -e MYSQL_ROOT_PASSWORD=example --name test mariadb:10.4
bf0814561d25bbd45704b89a704dc370a8be5eecd45998d30d7e42260d4cd73d
$ docker logs test | grep -i zone
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
$ docker logs --tail=2 test
2020-04-27 20:46:45 0 [Note] mysqld: ready for connections.
Version: '10.4.12-MariaDB-1:10.4.12+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
$ docker exec -i test mysql -uroot -pexample <<<'select convert_tz(now(), "UTC", "CET")'
convert_tz(now(), "UTC", "CET")
2020-04-27 22:47:57 |
@tianon Hm, yeah, your steps work for me too. Sorry for the false alarm. It seems I had an error in an entrypoint script. However, with |
I use this code on several docker build files, and it works well for me:
I can confirm that at least with the mariadb:10.4 tag, tzdata is already pre-installed and just reconfiguring it like the above will solve the problem and eliminate the warning message. |
Thank you. Works fine for me. Dockerfile FROM mariadb:10.5.3 RUN echo "Asia/Seoul" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata |
I'm running the following docker configuration:
And i'm getting the following warning messages:
Is there a way to do load the timezone information without showing these warnings?
The text was updated successfully, but these errors were encountered: