[DOCKER] Change the timezone of the https-portal container to JST

I'm running https-portal in a Docker container, but I've noticed that some containers have their timezone still in UTC. .. I'm having trouble viewing the log, so I'd like to change to JST.

The time zone is UTC.

$ docker-compose exec https-portal sh
# date
Sun Oct 25 03:36:07 UTC 2020

Let's set it with docker-compose.

docker-compose.yml


version: '3'

services:
  https-portal:
    container_name: https-portal
    image: steveltn/https-portal:1
    ports:
      - '80:80'
      - '443:443'
    restart: always
    environment:
      DOMAINS: 'example.net -> https://kusanagi01_httpd:8443 #production, example.com -> https://kusanagi02_httpd:8443 #local'
      ERROR_LOG: stderr
      ACCESS_LOG: stdout
      CLIENT_MAX_BODY_SIZE: 16M
      TZ: Asia/Tokyo                                                #add to
    networks:
      - shared-network

networks:
  shared-network:
    external: true

Recreate the container. I was able to confirm that it was changed to JST.

$ docker-compose stop
Stopping https-portal ... done
$ docker-compose up -d
Recreating https-portal ... done
$ docker-compose ps
    Name       Command   State                    Ports                  
-------------------------------------------------------------------------
https-portal   /init     Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp

$ docker-compose exec https-portal sh
# date
Sun Oct 25 12:49:10 JST 2020

Recommended Posts

Change the timezone of the https-portal container to JST
How to change the timezone on Ubuntu
Change the location folder of Docker image & container
[Rails] How to change the column name of the table
How to change the timezone on Ubuntu
I want to change the log output settings of UtilLoggingJdbcLogger
How to change the setting value of Springboot Hikari CP
How to change the contents of the jar file without decompressing
When you want to change the MySQL password of docker-compose
[Swift] How to dynamically change the height of the toolbar on the keyboard
[Rails] How to change the page title of the browser for each page
[chown] How to change the owner of a file or directory
I want to change the value of Attribute in Selenium of Ruby
The secret to the success of IntelliJ IDEA
Change the default timezone for the rails app
[Eclipse] Change the color of the vertical ruler
How to determine the number of parallels
Bootstrap4 Change the color of the hamburger menu
How to change the maximum and maximum number of POST data in Spark
[Rails] Change the label name of f.label
Ransack sort_link How to change the color!
How to sort the List of SelectItem
Output of the book "Introduction to Java"
How to change the value of a variable at a breakpoint in intelliJ
[Swift] Change the color of SCN Node
The process of introducing Vuetify to Rails
Change the half-width space of STS (Spring Tool Suite) from "u" to "・"
[swift5] How to change the color of TabBar or the color of item of TabBar with code
Change the save destination of the image to S3 in the Rails app. Part 2
[Swift] How to change the order of Bar Items in Tab Bar Controller [Beginner]
Change the port name and execution authority of the microcomputer connected to Ubuntu and LiDAR
How to find the cause of the Ruby error
I want to output the day of the week
Add empty data to the top of the list
Add the JDK to the TeamCity build agent container
Make a margin to the left of the TextField
The story of introducing Ajax communication to ruby
Procedure to change lower_case_table_names = 1 in MySQL 8.0 of CentOS 8.3
Set the time of LocalDateTime to a specific time
The story of raising Spring Boot 1.5 series to 2.1 series
I want to var_dump the contents of the intent
Change the URL of the application of Eclipse project (Maven).
How to get today's day of the week
Output of how to use the slice method
[Ruby] Code to display the day of the week
The story of adding the latest Node.js to DockerFile
How Microservices Change the Way of Developing Applications
How to display the result of form input
[AndroidStudio] Change the color of the ActionBarDrawerToggle hamburger menu
http: // localhost: How to change the port number
[Java] How to get the authority of the folder
Java Welcome to the Swamp of 2D Arrays
[rails] After option useful when you want to change the order of DB columns
Use the --build-arg option of docker-compose to pass environment variables to the container built with Dockerfile
[Docker] How to see the contents of Volumes. Start a container with root privileges.
How to change the action with multiple submit buttons
From the introduction of devise to the creation of the users table
How to delete / update the list field of OneToMany
When the hover of Eclipse is hard to see
Extend Highfaces to flip the vertical axis of the graph
How to write Scala from the perspective of Java