Besides setting timezone fixed inside image, I’d prefer passing it from environment variables.

Dockerfile:

1
2
3
4
FROM ubuntu

RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y tzdata

commandline:

1
docker run -it -e TZ=America/New_York <IMAGE> date