Multi-vessel [the original] docker-compose configuration management docker

Containers docker-compose multi-docker configuration management, automated docker's.

. 1 Version: ' 3.4 ' 
2 X-Defaults: & Defaults
 . 3    the restart: The unless stopped #-start mode, when the value Always, always restarting the container; when the value of no-failure, when the error appears to exit the container, container is restarted; unless- stopped mode from the start of the container
 . 4    network_mode: " host " 
. 5  services:
 . 6    MySQL: # name service
 . 7      hostname: # hostname MySQL
 . 8      Image: MySQL / MySQL: # Latest image
 . 9      CONTAINER_NAME: # container MySQL Title    
 10      Environment:
 . 11       - the TZ = Asia / of Shanghai time zone #   
 12 is      the ports: port #
 13 is        -80 : 80 
14        - 3000 : 3000 
15      Volumes:
 16        - " / etc / localtime: / etc / localtime: RO " # Set the container region and the host consistent
 . 17        - / Home / username / mysql / data: / data

 

Guess you like

Origin www.cnblogs.com/HYanqing/p/12083060.html