<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sikandar Zaman Virk on Medium]]></title>
        <description><![CDATA[Stories by Sikandar Zaman Virk on Medium]]></description>
        <link>https://medium.com/@i180748?source=rss-1b8c49b95e6b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pKXFeS7Wyc8i3b-e</url>
            <title>Stories by Sikandar Zaman Virk on Medium</title>
            <link>https://medium.com/@i180748?source=rss-1b8c49b95e6b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:04:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@i180748/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Top service mesh tools]]></title>
            <link>https://medium.com/@i180748/top-service-mesh-tools-7c26b799ac0f?source=rss-1b8c49b95e6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c26b799ac0f</guid>
            <dc:creator><![CDATA[Sikandar Zaman Virk]]></dc:creator>
            <pubDate>Thu, 01 Dec 2022 16:41:33 GMT</pubDate>
            <atom:updated>2022-12-01T16:41:33.587Z</atom:updated>
            <content:encoded><![CDATA[<p>In our last two blogs we have discussed docker compose and its new versions. So if you want to know about docker compose, you should read those blogs. I have given links of both blogs in references.</p><p>In this blog we will discuss top Service mesh tools. But first we will see that what is a service mesh and why we need a service mesh. So read this blog till end to get the idea about service mesh and its top tools.</p><p>These are the topics we will cover in this blog…</p><p>1- what is a service mesh ?</p><p>2- why we need a service mesh ?</p><p>3-Top service mesh tools.</p><h3>1- what is a service mesh ?</h3><p>So first of all we will that what is a service mesh. A service mesh is a platform layer on top of the infrastructure layer that enables managed, observable, and secure communication between individual services. This platform layer enables companies or individuals to create robust enterprise applications, made up of many microservices on a chosen infrastructure. Service meshes use consistent tools to factor out all the common concerns of running a service, like monitoring, networking, and security. That means service developers and operators can focus on creating and managing applications for their users instead of worrying about implementing measures to address challenges for every service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*kIcLUPztwKbHjhE3sO8BcA.png" /><figcaption>Service mesh architecture</figcaption></figure><p>Service meshes are transparent to the application. The service mesh monitors all traffic through a proxy. The proxy is deployed by a sidecar pattern to the microservices. This pattern decouples application or business logic from network functions, and enables developers to focus on the features that the business needs. Service meshes also let operations teams and development teams to decouple their work from one another.</p><h3>2- why we need a service mesh ?</h3><p>Now we will discuss that why we need a service mesh. If you are building applications on Kubernetes, then a service mesh like Linkerd provides critical observability, reliability, and security features with one big advantage: the application doesn’t need to implement these features, or even to be aware that the service mesh is there!</p><p>This is great for platform teams because it aligns their responsibilities with their ownership. It’s also great for developers, as it takes features that don’t pertain to business logic off of their plates.</p><p>If you aren’t using Kubernetes, the story becomes a little muddier. Kubernetes’ pod model and networking infrastructure allow service meshes to be implemented very easily with minimal operational burden. (Linkerd, for example, requires no configuration to install, even for mutual TLS!) Without these underlying features from Kubernetes, the cost of service mesh adoption starts increasing rapidly. While there are certainly “cross-platform” service meshes, the cost-benefit equation is very different, and care must be taken not to end up managing thousands of proxies by hand.</p><h3>3-Top service mesh tools.</h3><p>So here are some top service mesh tools.</p><h4>1. Istio</h4><p>Originally created by Google, Istio is a service mesh that is now open source. It offers a mechanism to link, control, and protect microservices that interact with one another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*4ZPDoJyzudKS7g0y.png" /></figure><p>All in-transit communication between services is encrypted as part of Istio’s security measures, and authorized users are given authentication credentials. Istio additionally provides capabilities like distributed tracing across machines or containers without the requirement for external software agents inside of individual nodes.<br>Many businesses, including Adobe, Baidu, and Google, employ Istio in their production processes.</p><h3>2. Linkerd</h3><p>In order to handle a large number of microservices in high-scale environments, Linkerd is an open-source service mesh that can be installed on top of a Kubernetes or a Mesos cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cxIeWUo-I-RMxxPo.png" /></figure><p>Along with automatic cluster-wide deployment upgrades, Linkerd will offer additional services like monitoring, tracing, routing, load balancing, and others.</p><h3>3. Cilium Service Mesh</h3><p>An open source, compact network and security solution for containers and microservices is called Cilium. For containers and microservices, it makes use of Berkeley Packet Filter (BPF) technology, which is part of the Linux kernel. Without being constrained by any one particular orchestration solution, Cilium offers a flexible way to containerize and microservice-ify applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*04sCaI6sV2xnbFK0.png" /></figure><ol><li>aware network policies for containers and microservices</li><li>Automatic discovery of services</li><li>L7 (Layer 7) aware policy enforcement</li><li>unified security architecture for hosts and containers</li><li>Fine-grained security visibility</li><li>Microservices and containers can communicate securely with each other.</li><li>No requirement for a central controller or administrative burden</li></ol><p>Without changing any code, Cilium makes it simple to enhance the networking and security of your containerized apps. Any Linux-based application can be used with Cilium because it connects with well-known orchestration tools like Docker, Kubernetes, and Mesos.<br>Cilium is the best option for you if you’re searching for a compact, user-friendly solution for networking and securing your containers and microservices.</p><h3>4. Consul connect</h3><p>Hashicorp’s Consul Connect is a service mesh solution.<br>Initially, Consul was created for service discovery. Consul Connect offers service discovery, configuration synchronization, and failure detection by deploying the service mesh on top of the consul.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*InP_MXhL-ZpF5ILj_Qy68Q.png" /><figcaption>Cunsul connect</figcaption></figure><p>Both Kubernetes and Consul Connect can be used in production environments.</p><h3>5. Traefik Mesh</h3><p>A simple service mesh solution called Traefik Mesh is primarily employed for load balancing.<br>In order to balance workloads, Traefik Mesh, a plug-in for the well-known reverse proxy Traefik, helps with service discovery and routing between services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*FbkmDZgGviXQ7DL8.png" /><figcaption>Traefik</figcaption></figure><p>Additionally, it offers functions like SSL termination and web socket proxying so you won’t have to worry about those issues on your own.</p><h3>6. Open Service Mesh (OSM)</h3><p>A lightweight and extensible cloud-native service mesh called Open Service Mesh (OSM) supports dynamic service discovery, monitoring, and routing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uirS-aP8yWOE4TCd.png" /><figcaption>OSM</figcaption></figure><p>OSM can be integrated at all levels to provide the best solution for your needs:</p><ol><li>Service Discovery — Layer four (IP), or layer seven (URL)</li><li>Monitoring — Metrics powered by Prometheus with support for Graphite, InfluxDB, and Elasticsearch</li><li>Routing — High availability is achieved by using HAProxy as a proxy between services and load balancing requests among pods in a cluster. Additionally, if they use insecure protocols like unencrypted TCP/UDP connections, it offers capabilities like SSL termination and web socket proxying so you won’t have to worry about those things on your own. By only allowing traffic from approved IPs to pass through the service mesh, this helps to ensure access control.</li></ol><h3>7. Nginx Service Mesh (NSM)</h3><p>In a zero-trust environment, the Nginx service mesh for Kubernetes provides encrypted traffic between containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*jBWFQ9T_EHYNQl1d.png" /><figcaption>NGINX</figcaption></figure><p>Using the data plane powered by Nginx Plus, it controls data traffic between containers. These are the areas of focus for Nginx service mesh.</p><ol><li><strong>Security: </strong>mTLS‑encrypted traffic between services.</li><li><strong>Traffic management</strong>: Rate limiting and circuit breakers are used in policy-managed traffic control between services.</li><li><strong>Visualization</strong>: An integrated Grafana dashboard gave access to NGINX plus metrics.</li><li><strong>Hybrid deployments</strong>: Through the Nginx ingress controller, legacy applications can collaborate with the service mesh.</li></ol><h3>8. Kuma</h3><p>Kong, Inc. originally developed the Kuma service mesh, which is currently a CNCF sandbox project. On top of the Envoy proxy, it is constructed. Both the Kubernetes cluster and virtual machines (VMs) can use it as a service mesh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*Paeo9AdosV5wZldBciGdjA.png" /><figcaption>Kuma</figcaption></figure><p>Following are the key features of Kuma</p><ol><li>Universal Control Plane</li><li>Lightweight Data Plane</li><li>Multi-Mesh</li><li>mTLS &amp; TLS rotation</li><li>Fault Injection</li><li>Traffic tracing and traffic metrics</li><li>Platform-Agnostic</li><li>Transparent proxying</li></ol><p>These are the top eight service mesh tools right now.</p><p>Hope you find this blog informative and we will continue to discuss topics like these in future. So do follow me and tell about topics of your interest.</p><h3>References:</h3><ul><li><a href="https://cloud.google.com/architecture/service-meshes-in-microservices-architecture">Service meshes in a microservices architecture | Cloud Architecture Center | Google Cloud</a></li><li><a href="https://medium.com/@i180748/docker-compose-4da5d9fce95">Docker Compose</a></li><li><a href="https://medium.com/@i180748/docker-compose-vs-docker-compose-5b5a5531cd19">Docker-compose vs Docker compose</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c26b799ac0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker-compose vs Docker compose]]></title>
            <link>https://medium.com/@i180748/docker-compose-vs-docker-compose-5b5a5531cd19?source=rss-1b8c49b95e6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b5a5531cd19</guid>
            <dc:creator><![CDATA[Sikandar Zaman Virk]]></dc:creator>
            <pubDate>Tue, 25 Oct 2022 18:14:59 GMT</pubDate>
            <atom:updated>2022-10-25T18:14:59.972Z</atom:updated>
            <content:encoded><![CDATA[<p>In the first blog, we have discussed what is docker compose, why we need docker compose and what are the benefits of docker compose. If you have not read that article, first go to my profile or click the link below and read that article.</p><p><a href="https://medium.com/@i180748/docker-compose-4da5d9fce95">Docker Compose</a></p><p>Now in this article we will see problems or limitations in docker compose and we will see how these problems have been solved in the updated versions of docker compose. We will see the differences between docker compose v1 and v2. Basically, we will find out that which new features v2 provides that v1 does not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*985lP1PbHRUaFAiCw5DaHg.png" /><figcaption>docker compose v1 vs v2</figcaption></figure><p>So here are the topics we will cover in this article:</p><p>1) Limitations in docker compose v1</p><p>2) Benefits of docker compose v2</p><p>3) which should you use ?</p><p>4) Yaml file changes</p><p>5) How to install docker compose v2 ?</p><p>6) GitHub repository</p><h3>1) Limitations in docker compose v1</h3><h4><strong>i) Project names:</strong></h4><p>The way Compose v1 handles project names is one of its drawbacks. Compose adds the project name to the service name of each container when you run <em>docker-compose up -d</em>. This makes sure that all of the containers are put in one group.<br>The project name in version 1 is got from the name of your working directory. By altering the <em>COMPOSE_PROJECT_NAME</em> environment variable, a different name can be selected manually.</p><h3><strong>2) Benefits of docker compose v2</strong></h3><h4>i) Fast Delivery of New Features Within the Docker CLI</h4><p>In docker compose v2, we have many new useful features which we do not see in v1:</p><p>a) It provide support for GPU machines. If the Docker host has GPU devices and the Docker Daemon is configured correctly, Compose services can specify GPU device reservations.</p><p>b) It also provide profiles support. By selectively enabling services, profiles let you to modify your Compose application model for different contexts and usages.</p><p>c) You may now check complete list of your Compose apps with the <em>docker compose ls</em> command.</p><p>d) You can copy files and folders between your service container and your local filesystem using the <em>docker compose cp</em> command.</p><p>These functionalities are distributed using the Docker CLI. The CLI updates are immediately applied to each Docker Desktop, which lessens your administrative strain.</p><h4>ii) Seamless Path to Production</h4><p>What if you could quickly put together a project and execute it within your AWS, ECS, or Azure ACI environment? By using new Cloud Integrations in Compose V2, you can do this.</p><p>Deploying Docker Compose applications to the cloud is now considerably simpler if you use ACI or ECS for production and Docker Compose for local development. By simply changing the Docker context, you may “compose up” an application on cloud platforms and run it on Amazon ECS or Microsoft ACI.</p><p>This is possible due to the V2 Compose specification. Platform independent multi-container applications can be defined using the Compose specification. The specifications can be used by other programs to run and validate these files.</p><h4>iii) Creating a Homogenous Docker Ecosystem in Go</h4><p>We all know that unlike other Docker ecosystem, Docker Compose V1 was written in Python before Compose V2. Compose V2, on the other hand, is written in Go. The CLI, Moby, and other Go-based projects’ code can all be converted into Go. We won’t need to develop any new features or bug fixes in Python after Docker Compose switches to Go.</p><p>We can now integrate a fix from the Docker CLI more easily with Compose. Accordingly, we can quickly deliver more value across our tooling. We can also easily add updates to Compose from other Docker tools, like BuildKit.</p><p>To preserve well-tested behavior while running both Docker and Docker Compose, we now utilize the same code for the run and exec commands in both Compose and the Docker CLI. The consistency between them makes it simpler for engineers to transition between them, even down to the log output.</p><h4>iv) Easier Update-and-Dependency Management with Compose Binaries</h4><p>We were previously unable to provide a static binary, but with Go, we can. This is due to Python’s lack of an integrated compiler. Due to this, we were compelled to use pyinstaller to provide binaries for popular operating systems (Linux, macOS, and Windows). V1 relies on the PyPI (via pip install) on more heterogeneous platforms, which makes managing dependencies more difficult. Numerous dependency combinations might already be installed on your system.</p><p>Finally, natively running things is considerably faster!</p><h4>v) Run Commands Without a Compose File</h4><p>Not to mention, container labels enable you to rebuild data from your YAML files. By simply adding -project-name to the command line, this functionality enables you to manage an active project and use commands like docker compose start/stop/pause/down/ps/exec… without using the original Compose file and environment variable. Simply use -project-name to select an existing project name that you’ve previously defined (-p).</p><p>For instance, you wouldn’t need to be in the project’s folder or have your Compose file in the current directory to use the following command:</p><pre>$ docker compose --project-name myproject down</pre><h3>vi) project names</h3><p>We saw the problem of project names in v1. By including a CLI flag to set the project name, version 2 makes this easier. To ignore the working directory name without changing the environment, add — project-name or -p. You can start several instances of a container stack or merge containers from different working directories into one stack by manually defining the project name.</p><p>You can list all of your system’s Compose stacks using a new v2 functionality. A table of project names and their statuses is provided by the docker compose ls command (running or stopped). This is a supplement to the docker compose ps command, which displays a stack’s statuses for each container.</p><p>Docker compose cp is now supported by Compose v2. You can copy files into and out of your containers with this command, which functions similarly to docker cp:</p><pre>docker cp my-container local-file.txt /path/to/container/file.txt</pre><h3>3) which should you use ?</h3><p>Version 2 has some advantages over Version 1 and is actively updated, therefore I definitely prefer it. V2 provides many extra features (discussed above) that v1 does not. So i will recommend you v2 of docker compose.</p><h3>4) Yaml file changes</h3><p>Version numbers for files created with the version 2 syntax must be displayed at the document’s root. The services key must have a declaration for each service.</p><p>Networks and named volumes can both be declared using the volumes and networks keys, respectively.</p><p><strong>Note</strong></p><p>Make sure to provide both the major and minor numbers when choosing the Compose file version to use. If no minor version is specified, 0 is used instead of the most recent minor version by default. Features included in later versions won’t be supported as a result. For instance:</p><p>version: “2”</p><p>version: “2.0”</p><p>Simple example:</p><pre>version: &quot;2.4&quot;<br>services:<br>  web:<br>    build: .<br>    ports:<br>     - &quot;8000:5000&quot;<br>    volumes:<br>     - .:/code<br>  redis:<br>    image: redis</pre><p>A more extended example, defining volumes and networks:</p><pre>version: &quot;2.4&quot;<br>services:<br>  web:<br>    build: .<br>    ports:<br>     - &quot;8000:5000&quot;<br>    volumes:<br>     - .:/code<br>    networks:<br>      - front-tier<br>      - back-tier<br>  redis:<br>    image: redis<br>    volumes:<br>      - redis-data:/var/lib/redis<br>    networks:<br>      - back-tier<br>volumes:<br>  redis-data:<br>    driver: local<br>networks:<br>  front-tier:<br>    driver: bridge<br>  back-tier:<br>    driver: bridge</pre><p>Several other options were added to support networking, such as:</p><ul><li><a href="https://docs.docker.com/compose/compose-file/compose-file-v2/#aliases">aliases</a></li><li>The <a href="https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on">depends_on</a> option can be used in place of links to indicate dependencies between services and startup order.</li></ul><pre>version: &quot;2.4&quot;<br>services:<br>  web:<br>    build: .<br>    depends_on:<br>      - db<br>      - redis<br>  redis:<br>    image: redis<br>  db:<br>    image: postgres</pre><ul><li><a href="https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address">ipv4_address, </a><a href="https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address">ipv6_address</a></li></ul><p>Variable substitution also was added in Version 2.</p><h3>5) How to install docker compose v2 ?</h3><p>Compose v2 is a binary, just as v2, therefore it could theoretically be copied to /usr/local/bin without any further steps. The binary needs to be copied into the plugin folder in order for the call to function as a plugin when using docker compose (i.e., spaces rather than minus). This is $HOME/.docker/cli-plugins for your local user; if you wish to install globally, use one of the other three of the following four folders:</p><ul><li>/usr/local/lib/docker/cli-plugins</li><li>/usr/local/libexec/docker/cli-plugins</li><li>/usr/lib/docker/cli-plugins</li><li>/usr/libexec/docker/cli-plugins</li></ul><p>Depending on whether you want to install system-wide or for your current user, you first create the desired folder. Then look for the latest stable version on the Compose release page. In my case, the 64-bit edition of the Raspberry Pi OS is installed on a Raspberry Pi 4, so I choose AARCH64 for the 64-bit ARM architecture. Depending on the hardware and software used, you can alternatively use ARMv7 or ARMv6. The binary is then downloaded and moved to the plugin folder. We change the name to <strong>docker-compose</strong> .</p><pre><strong>mkdir</strong> -p ~/.docker/cli-plugins<br>wget https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-aarch64<br><strong>mv</strong> docker-compose-linux-aarch64 ~/.docker/cli-plugins/docker-compose</pre><p>Now you can test the call as a plugin (with spaces instead of minus):</p><pre>$ docker compose version<br>Docker Compose version v2.3.3</pre><p>I would choose this installation technique since it is the official Docker recommended installation method for V2. You can use Compose with minus as in version 1 if you still like to relocate the binary to /usr/local/bin. It’s unclear though whether Docker will continue to offer full-featured support for this.</p><h3>6) GitHub repository</h3><p>Here are some important code files related docker compose V2.</p><p><a href="https://github.com/SikandarZaman20rk/Docker-compose-V2">GitHub - SikandarZaman20rk/Docker-compose-V2</a></p><p>References:</p><ul><li><a href="https://u-labs.de/portal/docker-compose-v1-vs-v2-welche-version-sollte-ich-benutzen-worin-liegen-die-unterschiede/">Docker Compose v1 vs. v2: Welche Version sollte ich benutzen? Worin liegen die Unterschiede?</a></li><li><a href="https://medium.com/@giorgioto/docker-compose-yml-from-v1-to-v2-3c0f8bb7a48e">Docker-compose.yml: from V1 to V2</a></li><li><a href="https://www.howtogeek.com/devops/whats-new-in-docker-compose-v2/">What&#39;s New In Docker Compose v2?</a></li><li><a href="https://docs.docker.com/compose/compose-file/compose-versioning/"></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b5a5531cd19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Compose]]></title>
            <link>https://medium.com/@i180748/docker-compose-4da5d9fce95?source=rss-1b8c49b95e6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4da5d9fce95</guid>
            <category><![CDATA[docker-compose]]></category>
            <dc:creator><![CDATA[Sikandar Zaman Virk]]></dc:creator>
            <pubDate>Fri, 16 Sep 2022 15:41:20 GMT</pubDate>
            <atom:updated>2022-09-16T15:41:20.141Z</atom:updated>
            <content:encoded><![CDATA[<p>This tutorial is written for the people which have some basic knowledge of docker and facing some issues or want to make their working more efficient. So if you know basics of docker and want to know about Docker Compose, this will be very helpful for you. And even if you do not know much about docker, this will be perfectly understandable for you.</p><p>In this writing, we will not go into complexities of Docker Compose And how it runs, instead, we will learns why even we need Docker Compose? What are the issues that we are facing? What is Docker Compose and how it solve these problems? What is yml file in Docker Compose ?</p><p>So these are the topics that we will cover in this tutorial.</p><h4>1-What is docker compose?</h4><h4>2-Why we need docker compose or problems that we are facing?</h4><h4>3-What are the benefits of docker compose?</h4><h4>4-Basic understanding of .YML file.</h4><h3>1-What is docker compose?</h3><p>Docker compose is a tool that was developed to help define and run multi-container applications. With Compose, we can create a YAML file to define all the services of our application and with a single command, we can create and start our services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2G5KOQVzqVIbxxxeKECZkA.jpeg" /></figure><h3>2-Why we need docker compose or problems that we are facing?</h3><p>So the first question that comes to mind that why should we use Docker Compose? What are problems that we are facing ?</p><h4><strong>Handle more than one containers:</strong></h4><p>So we know most of the applications are multitasking. They have front end, back end and database etc. So we have to make separate containers for each task. And we also have to write separate commands to build and run those containers. This requires a lot of time. As a user, we do not want to write all these commands.</p><h4><strong>Communication Problem b/w containers:</strong></h4><p>Other major problem is communication (networking) between different containers. Suppose we three different containers and we want communication between them. We have to write at least 2³ commands to enable networking (communication) between them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*QJ8fznpjjOPOkIGOBDx_9g.png" /><figcaption>networking</figcaption></figure><h4>Separately up and down all containers:</h4><p>Usually, we up and down containers one by one. If we have multiple containers, every time we will up all the containers one by one for use and after that we have to down all of them one by one. This is also an irritating task.</p><h4>Time consuming:</h4><p>And by handling each container separately, it we require more time. And as a developer, it is not ideal for us to waste time. So this is also a big issue.</p><p>So now, I hope we all understand the problems.</p><p>Here is time when docker compose comes in place. Docker compose make it very easy to handle these problems.</p><h3>3-What are the benefits of docker compose?</h3><p>Docker compose is best solution of these problems. By using docker compose we do not need to write build and run run commands for each container.</p><h4>Networking:</h4><p>You can see below network in the bottom of diagram in compose.yml file. This is for the networking between all services. This enables the communication between all services. We do not have to write all commands manually.If we do not mention this keyword in our yml file, then this will be added by default. So if you do not mention it, this will also work fine.</p><h4>UP and Down all containers with single command:</h4><p>We can up all services with a single command in YAML file. And in the same way we can down all services with just one command.</p><h4>Time efficient:</h4><p>This saves our time and makes our work more efficient.</p><h3>4-Basic understanding of .YML file.</h3><p>In docker compose, we write a YAML file and in that file we configure all service that our application require.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*R41cnujQbUfylkIxCjYe1A.png" /><figcaption>compose.yml</figcaption></figure><p>To explain this to you in a simple way, i will explain you the above diagram. For example we have three services user interface (UI), data base (DB) and any third service i.e test. Now, we will configure all these three services in a single yml file. We write services in the start and below that we just mention the names of all services. And below every service we mention image name, ports no. and we could mention the path also.</p><p>To get the clear idea you can see the figure below. A docker Compose file looks something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*xcFwyWN7tlhaj54ekZVLOA.png" /><figcaption>DockerCompose.yml</figcaption></figure><p>You can see version in the start of file. Its optional, you can skip this also.</p><p>So this is all about Docker Compose. We will see more details in the next part. So stay tuned for the next part :)</p><h3>How to install Docker Compose:</h3><p>You can visit the website mentioned below to see how to install compose.</p><p>You can install Docker Compose on different platforms from this website. It gives you the option to install on any platform like</p><p>1-Linux</p><p>2-Mac</p><p>3-Windows</p><p>You can see all the necessary information about installation from here.</p><p><a href="https://docs.docker.com/compose/install/"></a></p><h3>References:</h3><p><a href="https://docs.docker.com/compose/"></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4da5d9fce95" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>