DEV Community

Discussion on: Set timezone in your docker image

Collapse
 
kavindugeesara profile image
KavinduGeesara • Edited

Could you please tell me how to set on alpine base image?

my dockerfile is like this:

FROM alpine
ENV TZ="Asia/Colombo"

Collapse
 
bitecode profile image
BC • Edited

I think you need to install the tzdata first before setting the TZ, like ubuntu:

FROM alpine:latest

RUN apk update && apk add tzdata
ENV TZ="America/New_York"
Enter fullscreen mode Exit fullscreen mode

This works for me.