By default, the IAM container image uses UTC as its timezone.
- To change the timezone:
- ●Set the environment variable TZ to the desired timezone, to set the timezone for Java applications, i.e. Airlock IAM.
- ●Optional (in addition) bind mount /etc/localtime into the container to set the timezone for command-line tools i.e. docker exec -it ...
Set environment variable TZ
Docker CLI:
docker-compose.yml:
version: '3.7'
services:
iam:
image: docker.io/ergon/airlock-iam:7.6 environment:
- "TZ=Europe/Zurich"
Use the host system's timezone via bind mount
Docker CLI:
docker-compose.yml:
version: '3.7'
services:
iam:
image: docker.io/ergon/airlock-iam:7.6 volumes:
- type: bind
read_only: true
source: "/etc/localtime"
target: "/etc/localtime"