Difference between revisions of "Ubuntu docker-compose.yml example"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
  
  version: "[[3.3]]"
+
  version: "3.3"
 
   
 
   
 
  services:
 
  services:
 
   Ubuntu1:
 
   Ubuntu1:
         [[image]]: ubuntu
+
         image: ubuntu
         container_name: Ubuntu_container_1  
+
         container_name: Ubuntu_container_1
         [[restart:]] always
+
         hostname: Ubuntu_container_1
         [[stdin_open:]] true # [[docker run -i]]
+
        restart: always
         [[tty:]] true        # [[docker run -t]]
+
         [[stdin_open:]] true # docker run -i
 +
         [[tty:]] true        # docker run -t
 
   
 
   
 
   Ubuntu2:
 
   Ubuntu2:
         [[image]]: ubuntu
+
         image: ubuntu
 
         container_name: Ubuntu_container_2
 
         container_name: Ubuntu_container_2
 +
        hostname: Ubuntu_container_2
 
         restart: always
 
         restart: always
        [[tty:]] true
+
         stdin_open: true # docker run -i
         stdin_open: true # [[docker run -i]]
+
         tty: true        # docker run -t
         [[tty:]] true        # [[docker run -t]]
 
  
  

Revision as of 15:20, 28 July 2021

This article is a Draft. Help us to complete it.


version: "3.3"

services:
 Ubuntu1:
       image: ubuntu
       container_name: Ubuntu_container_1
       hostname: Ubuntu_container_1
       restart: always
       stdin_open: true # docker run -i
       tty: true        # docker run -t

 Ubuntu2:
       image: ubuntu
       container_name: Ubuntu_container_2
       hostname: Ubuntu_container_2
       restart: always
       stdin_open: true # docker run -i
       tty: true        # docker run -t


Related terms

See also

Advertising: