docker-compose命令和yml文件配置

 

docker-compose -f compose-server.yml up -d

version: '3'
services:
  eureka-server:
    image: mydocker/eureka-server-docker
    hostname: eureka-server
    container_name: eureka-server
    environment:
      JAVA: myjava

    extra_hosts:
      eureka-client: 192.168.102.128
      eureka-server: 192.168.102.128
    ports:
      - "8661:8661"
    volumes:
        - /opt/docker_volume/service/eureka-server-docker.jar:/app.jar
        - /etc/localtime:/etc/localtime:ro

docker官网有compose.yml文件属性详解 

地址:https://docs.docker.com/compose/compose-file/

posted @ 2017-10-17 15:04  旋转的梦  阅读(9707)  评论(0编辑  收藏  举报