Coder Social home page Coder Social logo

d-for-docker-and-c-for-compose-learn-docker-compose-in-one-repo's Introduction

D-for-Docker-and-C-for-Compose-learn-docker-compose-in-one-Repo

chrome_bXccLt7fbw

Docker-Compose: Version ".1"

its limited

  • you can define the services directily insted of creating service section
mongodb:
        image: mongodb:5.0
    
    mysqldb:
        image: mysql:latest
        
    application:
        image: java_springbot:latest
  • if you have multiple container on different network so, there is no way to define on specific location in YAML file.
  • we used --link command to connect to each others. all the conter run on the default "netwok-bridge"
  • there is no ways to pre ordered sequence dependentiese for container to run.

Docker-Compose: Version ".2"

  • define the all Services ONE service section.
service:
    mongodb:
        image: mongodb:5.0
    
    mysqldb:
        image: mysql:latest
        
    application:
        image: java_springbot:latest
  • must define the docker-composer verion in the first. version:2
  • it will Automated create a new default network and then attached all containers to this network, so you commnicate to each othere by calling services
  • container run Sequence role which container define first will run first and then others as well.
  • also define depends_on: to define the sequence and flow of containers.

Docker-Compose: Version ".3" [LATEST]

  • Define version "3" On the top.
  • same service section just like version "2".
  • it come with docker sawarm feature.
  • define the networks: in the different services:
version: 3

service:
    mongodb:
        image: mongodb:5.0
        
        networks:
                - database
    mysqldb:
        image: mysql:latest
        
        networks:
                - database
        
     application:
        image: java_springbot:latest
        
        networks:
                - application
                                
networks:
        - application
        - database

d-for-docker-and-c-for-compose-learn-docker-compose-in-one-repo's People

Contributors

syedasadrazadevops avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.