You are here

通过docker-compose修改时区

docker 容器默认的时区如果需要修改,可以通过docker-compose.yml.


elastalert:
   image: ivankrizsan/elastalert:latest
   volumes:
       - ./ElastalertShared/logs:/opt/logs
       - ./ElastalertShared/rules:/opt/rules
   links:
       - elk_stack:elasticsearch_host
   environment:
       - SET_CONTAINER_TIMEZONE=true
       - CONTAINER_TIMEZONE=Europe/Stockholm
   stdin_open: false
   tty: false

参考链接:
https://www.ivankrizsan.se/2015/10/31/time-in-docker-containers/