How to set the timezone for docker container

This article only applies to Atlassian's docker. Learn more about the Atlassian docker here.

NOTE

Confluence Docker image is published as both atlassian/confluence and atlassian/confluence-server. These are the same image, but the -server version is deprecated and only kept for backwards-compatibility; for new installations it is recommended to use the shorter name.


目的

The timezone value in Atlassian docker container by default is GMT, however, it is possible to alter this default by passing an additional parameter to the container with -e TZ=<TIMEZONE>.

ソリューション

Docker

Here is the docker run command example setting:

docker run \
--name="confluence" -d \
-p 8090:8090 \
-p 8091:8091 \
-v ~/confluence-home/confluence-docker:/var/atlassian/application-data/confluence \
-e TZ=Australia/Sydney \
atlassian/confluence

(info) Normally this command is run as one line.

Kubernetes 

In Kubernetes, find and add the following setting to the Helm chart configuration YAML file:

  # -- Defines any additional environment variables to be passed to the Confluence
  # container. See https://hub.docker.com/r/atlassian/confluence for
  # supported variables.
  #
  additionalEnvironmentVariables: 
    - name: TZ
      value: Australia/Sydney



The list of the timezone supported by Confluence is as below: (Copied from Confluence source code timezones.properties file)

timezones.properties
GMT, \
Pacific/Apia, \
HST, \
AST, \
America/Los_Angeles, \
America/Phoenix, \
America/Mazatlan, \
America/Denver, \
America/Belize, \
America/Chicago, \
America/Mexico_City, \
America/Regina, \
America/Bogota, \
America/New_York, \
America/Indianapolis, \
America/Halifax, \
America/Caracas, \
America/Santiago, \
America/St_Johns, \
America/Sao_Paulo, \
America/Buenos_Aires, \
America/Godthab, \
Atlantic/South_Georgia, \
Atlantic/Azores, \
Atlantic/Cape_Verde, \
Africa/Casablanca, \
Europe/Dublin, \
Europe/Berlin, \
Europe/Belgrade, \
Europe/Paris, \
Europe/Warsaw, \
ECT, \
Europe/Athens, \
Europe/Minsk, \
Europe/Bucharest, \
Africa/Cairo, \
Africa/Harare, \
Europe/Helsinki, \
Asia/Jerusalem, \
Asia/Baghdad, \
Asia/Kuwait, \
Europe/Moscow, \
Africa/Nairobi, \
Asia/Tehran, \
Asia/Muscat, \
Asia/Baku, \
Asia/Kabul, \
Asia/Yekaterinburg, \
Asia/Karachi, \
Asia/Calcutta, \
Asia/Katmandu, \
Asia/Almaty, \
Asia/Dhaka, \
Asia/Colombo, \
Asia/Rangoon, \
Asia/Bangkok, \
Asia/Krasnoyarsk, \
Asia/Hong_Kong, \
Asia/Irkutsk, \
Asia/Kuala_Lumpur, \
Australia/Perth, \
Asia/Taipei, \
Asia/Tokyo, \
Asia/Seoul, \
Asia/Yakutsk, \
Australia/Adelaide, \
Australia/Darwin, \
Australia/Brisbane, \
Australia/Sydney, \
Pacific/Guam, \
Australia/Hobart, \
Asia/Vladivostok, \
Pacific/Noumea, \
Pacific/Auckland, \
Pacific/Fiji, \
Pacific/Tongatapu


説明
How to set the timezone for Confluence docker container
製品Confluence, Jira, Crowd

最終更新日 2024 年 9 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.