Advertisement

This docker-compose file allows editing the container and ensures that the container has systemctl support.

阅读量:

背景

所撰写的docker-compose配置文件内容如下:

复制代码
 version: '2'

    
 services:
    
   MSPW08:
    
     container_name: mspw08
    
     image: web:1.0.0
    
     working_dir: /home/ewang
    
     hostname: mspw08
    
     ports:
    
       - 8089:8080
    
     networks:
    
       outside:
    
     ipv4_address: 192.23.6.19
    
     privileged: true
    
     
    
     command:
    
     - /usr/sbin/init
    
     - -c
    
     - |
    
       
    
       echo '10.10.110.30   jszx-tdh07'>>/etc/hosts
    
       echo '10.10.110.31   jszx-tdh08'>>/etc/hosts
    
       echo '10.10.110.32

全部评论 (0)

还没有任何评论哟~