Following the installation guide, ReportPortal is successfully deployed. Everything works fine, except for one thing... Containers time zone is always UTC. My CI servers are located in UTC+3, so, for example, launch reported at 00.30 is shown on widget as yesterday's one.
Most of images are alpine based, without installed tzdata. I tried to add hosts etc/localtime
as a volume (/etc/localtime:/etc/localtime:ro
) but it doesn't help.
I've got the same result on RHEL 7 and Win 10 local machine with Docker Toolbox. Appreciate if somebody share his experience with this problem.
Solved it.
Actually, that's enough to change a timezone in api container only. Adding environment variable TZ is solving the issue. So I just added it to the docker-compose file:
api:
image: reportportal/service-api:4.3.0
depends_on:
- mongodb
environment:
- RP_PROFILES=docker
- JAVA_OPTS=-Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp
- TZ=Asia/Jerusalem
restart: always