Friday, November 22, 2019

How to set TimeZone in Linux Docker Container

#How to set TimeZone in Linux Docker Container

```
apk add tzdata
```
ex:
Dockerfile
```
from python:3.7-alpine
RUN apk add tzdata
ENV TZ=Asia/Bangkok
CMD xxxx
```

#TimeZone in slim and Ubuntu Linux Docker Container

ex:
Dockerfile
```
from python
ENV TZ=Asia/Bangkok
CMD xxxx
```

ex:
Run Container (slim or full linux images)
```
docker run --name container-name -e 'TZ=Asia/Bangkok' python
```

1 comment:

Note: Only a member of this blog may post a comment.

ALCATEL 6900

write memory copy running certified reload from working no rollback-timeout