Senin, 22 Juni 2020

TIMEZONE-docker




Add /etc/localtime:/etc/localtime:ro to the volumes attribute:
version: '3'

services:
  a-service:
      build: .
      image: service-name
      container_name: container-name
      volumes:
        - /etc/localtime:/etc/localtime:ro

  improve this answer   

----------------------------------------------------------------------
services:
 web:
#    image: nginx:latest
   image: webdevops/apache:latest
   environment:
       - WEB_DOCUMENT_ROOT=/var/www/proyekit
       - WEB_PHP_SOCKET=php:9000
   container_name: web
   ports:
       - "80:80"
   volumes:
       - /var/www/proyekit:/var/www/proyekit
#        - ./000-default.conf:/etc/apache2/sites-available/000-default.conf
#        - /data/appl/web/tmp:/tmp
   links:
       - php
   network_mode: bridge

 php:
   build: './php'
   container_name: php
   environment:
       - TIMEZONE=Asia/Jakarta
   volumes:
       - /var/www/proyekit:/var/www/proyekit
   network_mode: bridge

 pgsql:
   image: postgres:9.3
   container_name: pgsql
   ports:
     - 5432:5432
   environment:
     POSTGRES_DB: "userrequest"
     POSTGRES_USER: "user"
     POSTGRES_PASS: "1234567890"
#      PGDATA: /var/lib/postgresql/8.3/main
   volumes:
     - ./backup:/usr/local/psql/data
     - ./data:/var/lib/postgresql/data
   network_mode: bridge

----------------------------------------------------------------------------


setting jam 172.16.67.206
root@f16cd9da62fe:/app# ln -s  /usr/share/zoneinfo/Asia/Jakarta localtime^C
root@f16cd9da62fe:/app# cd /etc/

Tidak ada komentar:

Posting Komentar