kometchtech / docker-build

personal docker build for armhf and aarch64
15 stars 5 forks source link

scratchイメージのTimezoneの設定方法 #5

Closed kometchtech closed 5 years ago

kometchtech commented 5 years ago

https://www.google.com/search?q=docker+scratch+image+timezone&ie=utf-8&oe=utf-8

この辺りを見ると、zoneinfo.zipを渡している。 が、実際に設定してみてもTimezoneは変わらなかった。 https://github.com/jeremyhuiskamp/golang-docker-scratch/blob/master/Dockerfile https://sebest.github.io/post/create-a-small-docker-image-for-a-golang-binary/

kometchtech commented 5 years ago

https://github.com/kometchtech/docker-build/blob/e5b394bb0269365c42010acbd602b882134dbc92/gobetween/Dockerfile#L22-L24 goのバイナリ自体はこれを見ていない?

kometchtech commented 5 years ago

/etc/localtimeを見ているので、そこをボリュームマウントするしかない模様。

-v /etc/localtime:/etc/localtime:ro