---
title: "Container Timezone"
date: 2021-08-06T12:25:49.000Z
author: Z.SHINCHVEN
tags: [Docker, Timezone, Container]
canonical: https://atlassc.net/2021/08/07/container-timezone
---
Besides setting timezone fixed inside image, I'd prefer passing it from environment variables.

Dockerfile:

```Dockerfile
FROM ubuntu

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


commandline:
```bash
docker run -it -e TZ=America/New_York <IMAGE> date
```
