Skip to content
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

-e TZ=Europe/Moscow #149

Closed
bscheshirwork opened this issue Feb 15, 2017 · 10 comments
Closed

-e TZ=Europe/Moscow #149

bscheshirwork opened this issue Feb 15, 2017 · 10 comments

Comments

@bscheshirwork
Copy link

I can't configure the nginx service throw environment TZ

Another service in the composition can set timezone with

    environment:
      TZ: Europe/Moscow
$ date
Ср фев 15 18:16:52 MSK 2017
$ docker-compose run --rm php date
Wed Feb 15 18:17:05 MSK 2017
$ docker-compose run --rm db date
Wed Feb 15 18:17:47 MSK 2017

but nginx-alpine has strange effect:

$ docker-compose run --rm nginx date
Wed Feb 15 15:18:20 GMT 2017

without pass -e

$ docker-compose run --rm nginx date
Wed Feb 15 15:18:44 UTC 2017

UTC -> GMT

may be this
gliderlabs/docker-alpine#136 (comment)

@thresheek
Copy link
Collaborator

That looks like a problem in the alpine image, not nginx related.

@bscheshirwork
Copy link
Author

The nginx use it... Write time, for exp, in log file. So... Can may be need expand alpine for nginx and resolve problem?

@bscheshirwork
Copy link
Author

yes, its resolve problem.

$ docker-compose run --rm nginx date
Wed Feb 15 15:55:29 GMT 2017
$ docker-compose run --rm nginx date
Wed Feb 15 18:55:55 MSK 2017

@thresheek
Copy link
Collaborator

Please provide a PR for it, then.

bscheshirwork added a commit to bscheshirwork/docker-nginx that referenced this issue Feb 15, 2017
@bscheshirwork bscheshirwork mentioned this issue Feb 15, 2017
@khs1994
Copy link

khs1994 commented Oct 13, 2017

You can add

FROM nginx:1.13.5-alpine

RUN apk add --no-cache tzdata

in Dockerfile ,rebuild docker image

@khs1994
Copy link

khs1994 commented Oct 13, 2017

other based alpine Docker Image (redis,memcached,etc) is not include tzdata!

@khs1994
Copy link

khs1994 commented Oct 13, 2017

@bscheshirwork I got it.

@bscheshirwork
Copy link
Author

bscheshirwork commented Oct 13, 2017

other based alpine Docker Image (redis,memcached,etc) is not include tzdata!

Thank you! I will propose this changes into redis image too...

@khs1994
Copy link

khs1994 commented Oct 13, 2017

Add tzdata use 1.3MB size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants