<?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 Nitin Agarwal on Medium]]></title>
        <description><![CDATA[Stories by Nitin Agarwal on Medium]]></description>
        <link>https://medium.com/@BeNitinAgarwal?source=rss-774ed69dac1f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YoErVMYNgKHKaYFPWFyvrQ.jpeg</url>
            <title>Stories by Nitin Agarwal on Medium</title>
            <link>https://medium.com/@BeNitinAgarwal?source=rss-774ed69dac1f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:44:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@BeNitinAgarwal/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[Docker’s New Versioning scheme: Introduced]]></title>
            <link>https://medium.com/@BeNitinAgarwal/dockers-new-versioning-scheme-introduced-9bf594a278cf?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bf594a278cf</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Fri, 03 Mar 2017 11:25:57 GMT</pubDate>
            <atom:updated>2017-03-03T11:34:28.930Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hoWe-xAW-NlTRJ89RvHvog.png" /><figcaption>Image Source and Credits: <a href="https://blog.docker.com/2017/03/docker-enterprise-edition/">https://blog.docker.com/2017/03/docker-enterprise-edition/</a></figcaption></figure><p>Docker recently introduced a new time-based versioning scheme for Docker Engine as well as announced a new Enterprise Edition (EE) version of Docker platform for business-critical deployments.</p><p>Docker EE would now be available in three tiers:</p><ul><li><strong>Basic: </strong>Docker platform for certified infrastructure, with support from Docker Inc. and certified Containers and Plugins from Docker Store.</li><li><strong>Standard: </strong>Adds advanced image and container management, LDAP/AD user integration, and role-based access control (Docker Datacenter).</li><li><strong>Advanced: </strong>Adds Docker Security Scanning and continuous vulnerability monitoring.</li></ul><p>Docker Engine (available for free) will now be known as Community Edition (CE) version and will be mentioned along with the version name (YY.MM). Say for example, the Docker Engine community edition released this month is versioned as <strong>v17.03.0-ce</strong>. If any security fixes or bugs are needed in that month’s next release, then the version would be as <strong>v17.03.1-ce</strong>.</p><p>Other than this, Docker CE will be coming in two variants:</p><ul><li><strong>Edge:</strong> Released montly for users who need the latest and greatest features every month. Edge releases only get security and bug-fixes during the month they are current.</li><li><strong>Stable:</strong> Released quarterly for users who want an easier-to-maintain release pace. Quarterly stable releases receive patches for critical bug fixes and security issues for 4 months after initial release.</li></ul><p>Source: <a href="https://blog.docker.com/2017/03/docker-enterprise-edition/">https://blog.docker.com/2017/03/docker-enterprise-edition/</a></p><p>Disclaimer: Content and Image source has been mentioned. Special credit to concerned folks and Docker Community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bf594a278cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s new in Docker Compose v3]]></title>
            <link>https://medium.com/@BeNitinAgarwal/whats-new-in-docker-compose-v3-139bbdafa5ed?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/139bbdafa5ed</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 12:38:08 GMT</pubDate>
            <atom:updated>2017-01-30T07:42:19.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*CDkilA3HlFh4JUjPPkxh5A.png" /><figcaption>Image Source &amp; Credits: <a href="http://blog.terranillius.com/post/composev3_swarm/">http://blog.terranillius.com/post/composev3_swarm/</a></figcaption></figure><p>In this blog, we’ll discuss new features added in Docker Compose v3. Docker compose added the feature of stack deployment with swarm.</p><p>To achieve this, we need to create a file named, <strong>docker-stack.yml</strong> and specify the deploy key, which would allow you to specify various properties of a swarm deployment in docker-stack.yml file.</p><p>For deploying this, you simply need to run the docker-stack deploy command with this docker-stack.yml file to pull the referenced images and launch the services in a swarm as configured in the .yml.</p><h4>deploy key</h4><p>The deploy key allows you to specify configuration related to the deployment and running of services. The deploy key can also be used to constrain some services to run only on the manager node.</p><p>Specify configuration related to the deployment and running of services. This only takes effect when deploying to a swarm cluster with `docker stack deploy` command and is ignored by docker-compose up and docker-compose run commands.</p><pre>deploy:<br>  mode: replicated<br>  replicas: 5<br>  update_config:<br>    parallelism: 2<br>    delay: 10s<br>  restart_policy:<br>    condition: on-failure</pre><p>Several sub-options available are mentioned below:</p><h4>mode</h4><p>mode is specified either as global (exactly one container per swarm node) or replicated (a specified number of containers). Default is replicated.</p><pre>mode: <strong>global</strong></pre><h4>replicas</h4><p>To specify the number of containers that should be running at any given time.</p><pre>replicas: 5</pre><h4>placement</h4><p>To specify the placement constraints.</p><pre>placement:<br>  constraints:<br>    - node.role == manager<br>    - engine.labels.operatingsystem == ubuntu 16.04</pre><h4>update_config</h4><p>To configure how the service should be updated. Useful for configuring rolling updates.</p><ul><li>parallelism: The number of containers to update at a time.</li><li>delay: The time to wait between updating a group of containers.</li><li>failure_action: What to do if an update fails. Either continue or pause Default is pause.</li></ul><pre>update_config: <br>  parallelism: 2 <br>  delay: 10s</pre><h4>resources</h4><p>To configure resource constraints. This replaces the older resource constraint options in Compose files prior to version 3 (cpu_shares, cpu_quota, cpuset, mem_limit, memswap_limit).</p><pre>resources:<br>  limits:<br>    cpus: &#39;1.5&#39;<br>    memory: 500M<br>  reservations:<br>    cpus: &#39;1.0&#39;<br>    memory: 200M</pre><h4>restart_policy</h4><p>To configure whether and how to restart containers when they exit.</p><ul><li>condition: One of none, on-failure or any. <strong>Default is any</strong>.</li><li>delay: How long to wait between restart attempts. <strong>Default is 0</strong>.</li><li>max_attempts: How many times to attempt to restart a container before giving up. <strong>Default is never give up</strong>.</li><li>window: How long to wait before deciding if a restart has succeeded. <strong>Default is decide immediately</strong>.</li></ul><pre>restart_policy: <br>   condition: on-failure <br>   delay: 5s <br>   max_attempts: 3 <br>   window: 120s</pre><h4>labels</h4><p>To specify labels for the service. These labels will be set only on the service, and <em>not</em> on any containers for the service.</p><pre>version: &quot;3&quot;<br>services:<br>  web:<br>    image: web<br>    deploy:<br>      labels:<br>        com.example.description: &quot;This label will appear on the web service&quot;</pre><p>To set labels on containers instead, use the labels key outside of deploy:</p><pre>version: &quot;3&quot;<br>services:<br>  web:<br>    image: web<br>    labels:<br>      com.example.description: &quot;This label will appear on all containers for the web service&quot;</pre><h4>“docker stack deploy” command</h4><p>docker stack deploy command (supported only by compose v3) is used to deploy with docker-stack.yml.</p><p>This command does not support the build key supported in Compose files, which builds based on a Dockerfile. You need to use pre-built images with docker stack deploy.</p><p>Source: ~ Docker Docs</p><p>Disclaimer: Content and image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=139bbdafa5ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker v1.13 is pretty much Awesome]]></title>
            <link>https://medium.com/@BeNitinAgarwal/docker-v1-13-is-pretty-much-awesome-a10a66459acc?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10a66459acc</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 10:05:59 GMT</pubDate>
            <atom:updated>2017-01-30T07:42:44.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*MYX0ClbWoitxS0RNUVvj8A.png" /><figcaption>Image Source &amp; Credit: <a href="https://docs.docker.com/engine/understanding-docker/">https://docs.docker.com/engine/understanding-docker/</a></figcaption></figure><p>In this blog, we’ll discuss the new features added in Docker v1.13.</p><h4>System commands</h4><p>Docker v1.13 introduces the system commands to help users check how much disk space Docker is using, display systemwide docker information and get real time events from the server.</p><p>To show used space by docker, you can execute:</p><pre>docker system df</pre><p>To show system wide information, you can use:</p><pre>docker system info</pre><h4>A set of Management commands</h4><p>Docker v1.13 introduces the management commands for container, image, plugin, secret, stack and system. Now, you can list the container or create the container with the help of:</p><pre>docker container ls <br>OR docker container list<br>docker container create &lt;OPTIONS&gt; &lt;container-name&gt;</pre><p>Similarly for image, plugin, secret, stack and system.</p><p>These changes gives a clear visibility of top commands to the users while using the docker CLI. Though the old command syntax is still supported in Docker v1.13.</p><h4>Clean up commands</h4><p>Docker 1.13 introduces clean-up commands to help users removed unused data. To remove all unused containers, images, networks and volumes, you just need to execute:</p><pre>docker system prune</pre><p>For removing containers, images, networks and volumes, you can execute:</p><pre>docker container prune<br>docker image prune<br>docker network prune<br>docker volume prune</pre><h4>Using Docker Compose files for deploying Swarm mode services</h4><p>Docker v1.13 adds compose file support to the docker stack deploy command so that services can be deployed using a docker-compose.yml file directly. With this, you can now specify the number of desired instances, constraints and rolling update policies for each service.</p><p>Deploying a multi-host, multi-service stack is now as simple as:</p><pre>docker stack deploy --compose-file=docker-compose.yml &lt;stack-name&gt; </pre><h4>Debugging Services made simpler</h4><p>Docker 1.13 adds the docker service logs command to help users debug services much simpler. Now instead of having to track down hosts and containers powering a particular service and pulling logs from those containers, docker service logs pulls logs from all containers running a service and streams them to your console.</p><p>To use this feature, you need to start the docker daemon in experimental mode using--experimental flag.</p><h4>Image build improvements</h4><p>Docker v1.13 adds a new feature of taking all the filesystem layers produced by a build and collapsing them into a single new layer, with the help of --squash flag. This can help simplify the creation of minimal docker images, but might result in slightly higher overhead while pushing &amp; pulling of images. For using the squash feature, you need to start the docker daemon with the --experimental flag.</p><p>Docker 1.13 also supports the feature of compressing the build context, which is being sent from CLI to docker daemon using the --compress flag. This will help in speeding up builds done on remote daemons by reducing down the amount of data sent.</p><p>Docker 1.13 also adds--network flag to docker build command.</p><h4>Improved CPU Management</h4><p>Docker 1.13 has added a --cpus flag, to ease users limit the cpus of the container. Previously, cpushares and cpuset takes much more thought and planning to use it correctly for limiting the CPU cores of a container.</p><p>With Docker 1.13, if you want to a container to be limited to one cpu core, then you can now simply add --cpus 1.0 along with docker run/create command.</p><h4>Networking</h4><p>Docker 1.13 adds the --attachable network support to enable docker run to work in swarm-mode overlay network. Also, adds the support for host port PublishMode in services using the --publish option in docker service create.</p><p>One can now also see the peer nodes in docker network inspect for swarm overlay networks.</p><h4>Improved Runtime</h4><p>Docker v1.13 adds a --shutdown-timeout daemon flag to specify the default timeout (in secs) to stop containers gracefully before daemon exit and --stop-timeout to specify the timeout value (in secs) for individual containers to stop.</p><p>With docker 1.13, now comes the support for --cpu-rt-period and --cpu-rt-runtime flags, allowing containers to run real-time threads when CONFIG_RT_GROUP_SCHED is enabled in the kernel.</p><h4>Inbuilt Init Process</h4><p>Docker 1.13 also adds--init flag on dockerd and docker run to run a zombie-reaping init process as PID 1 inside the container.</p><p>A new daemon flag --init-path is added with dockerd to allow configuring the path to the docker-init binary.</p><h4>Secret Management</h4><p>Docker 1.13 now adds the secret management command docker secret for managing secrets.</p><h4>Improved Service CLI</h4><p>Docker 1.13 now adds support for templating service options (hostname, mounts, and environment variables). You can now also add --dns, --dns-opt, and --dns-search while creating a service. Also,--hostname and --host flags are added to docker service createcommand.</p><p>With docker service update , Docker 1.13 supports the--host-add, --host-rm , --update-max-failure-ratio, --update-monitor and --rollback flags.</p><p>The global services can be displayed by docker service ls command.</p><p>Source: ~ Docker Docs</p><p>Disclaimer: Content and image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10a66459acc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with Docker v1.13 CLI -Management commands]]></title>
            <link>https://medium.com/@BeNitinAgarwal/working-with-docker-v1-13-cli-management-commands-3908d09ca455?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3908d09ca455</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 07:33:21 GMT</pubDate>
            <atom:updated>2017-01-30T07:47:45.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*9Lu8nRS-55DJWowGF7jy2Q.png" /><figcaption>Image Source and Credits: <a href="http://www.itzgeek.com/how-tos/linux/centos-how-tos/working-with-docker-containers-command-line-interface.html">http://www.itzgeek.com/how-tos/linux/centos-how-tos/working-with-docker-containers-command-line-interface.html</a></figcaption></figure><p>In Docker engine v1.13, we got the management commands for <strong>container</strong>, <strong>image</strong>, <strong>plugin</strong>, <strong>secret</strong>, <strong>stack</strong> and <strong>system</strong>.</p><p>Below, we’ll see how to work with each of the management commands and sub-commands.</p><h4>docker container</h4><p>To attach to a running container</p><pre>docker container attach &lt;container-id/name&gt;</pre><p>To create a image from a container’s changes</p><pre>docker container commit &lt;container-id/name&gt; &lt;new-image-name&gt;</pre><p>To copy files/folders from the host to a container or vice-versa.</p><pre>docker container cp &lt;file&gt; &lt;container-id/name&gt;:/path/to/copy</pre><pre>docker container cp &lt;container-id/name&gt;:/path/from/copy &lt;to-copy-on-host&gt;</pre><p>To create a new container</p><pre>docker container create --name &lt;container-name&gt; &lt;image-id/name&gt;</pre><p>To inspect changes on a container’s filesystem</p><pre>docker container diff &lt;container-id/name&gt;</pre><p>To run a command in a running container</p><pre>docker container exec &lt;container-id/name&gt;</pre><p>To export a container’s filesystem as a tar archive</p><pre>docker container export &lt;container-id/name&gt;</pre><p>To display low-level information of a container</p><pre>docker container inspect &lt;container-id/name&gt;</pre><p>To kill a running container</p><pre>docker container kill &lt;container-id/name&gt;</pre><p>To fetch the logs of a container</p><pre>docker container logs &lt;container-id/name&gt;</pre><p>To list containers</p><pre>docker container ls<br>OR docker container list<br>OR docker container ps</pre><p>To pause all processes within a container</p><pre>docker container pause &lt;container-id/name&gt;</pre><p>To list port mappings for the container</p><pre>docker container port &lt;container-id/name&gt;</pre><p>To remove all stopped containers</p><pre>docker container prune </pre><p>To rename a container</p><pre>docker container rename &lt;old-container-name&gt; &lt;new-container-name&gt;</pre><p>To restart a container</p><pre>docker container restart &lt;container-id/name&gt;</pre><p>To remove a container</p><pre>docker container rm &lt;container-id/name&gt;</pre><p>To run a command in a new container</p><pre>docker container run --name &lt;container-name&gt; -it &lt;image-name&gt;</pre><p>To start a stopped container</p><pre>docker container start &lt;container-id/name&gt;</pre><p>To display a live stream of container(s) resource usage statistics</p><pre>docker container stats</pre><p>To stop a container</p><pre>docker container stop &lt;container-id/name&gt;</pre><p>To display the running processes of a container</p><pre>docker container top &lt;container-id/name&gt;</pre><p>To unpause all processes within a container</p><pre>docker container unpause &lt;container-id/name&gt;</pre><p>To update configuration of a container</p><pre>docker container update &lt;OPTIONS&gt; &lt;container-id/name&gt;</pre><p>To block until a container stops and then print their exit codes</p><pre>docker container wait &lt;container-id/name&gt;</pre><h4>docker image</h4><p>To build an image from a Dockerfile</p><pre>docker image build -t &lt;image-name&gt; .</pre><p>To show the history of an image</p><pre>docker image history &lt;image-id/name&gt;</pre><p>To import the contents from a tarball to create a filesystem image</p><pre>docker image import &lt;file-name&gt; &lt;image-name&gt;</pre><p>To display low-level information of a image</p><pre>docker image inspect &lt;image-id/name&gt;</pre><p>To load an image from a tar archive or STDIN</p><pre>docker image load -i &lt;file-name&gt;</pre><p>To list images</p><pre>docker image ls<br>OR docker image list<br>OR docker image images</pre><p>To remove unused images</p><pre>docker image prune</pre><p>To pull an image from a registry</p><pre>docker image pull &lt;image-name:tag&gt;</pre><p>To push an image to a registry</p><pre>docker image push &lt;image-name:tag&gt;</pre><p>To remove a image</p><pre>docker image rm &lt;image-id/name&gt;</pre><p>To save an image to a tar archive</p><pre>docker image save &lt;image-name&gt;</pre><p>To create a tag for a image</p><pre>docker image tag &lt;old-image-name&gt; &lt;new-image-name&gt;</pre><h4>docker network</h4><p>To connect a container to a network</p><pre>docker network connect &lt;network-name&gt; &lt;container-id/name&gt;</pre><p>To create a network</p><pre>docker network create -d &lt;network-driver&gt; &lt;OPTIONS&gt; &lt;network-name&gt;</pre><p>To disconnect a container from a network</p><pre>docker network disconnect &lt;network-name&gt; &lt;container-id/name&gt;</pre><p>To display detailed information of a network</p><pre>docker network inspect &lt;network-name&gt;</pre><p>To list networks</p><pre>docker network ls</pre><p>To remove all unused networks</p><pre>docker network prune</pre><p>To remove a network</p><pre>docker network rm &lt;network-name&gt;</pre><h4>docker node</h4><p>To demote a node from manager in the swarm</p><pre>docker node demote &lt;node-name&gt;</pre><p>To display detailed information on a node</p><pre>docker node inspect &lt;node-name&gt;</pre><p>To list nodes in the swarm</p><pre>docker node ls</pre><p>To promote one or more nodes to manager in the swarm</p><pre>docker node promote &lt;node-name&gt;</pre><p>To list tasks running on one or more nodes.</p><pre>docker node ps self/&lt;node-name&gt;</pre><p>To remove one or more nodes from the swarm</p><pre>docker node rm &lt;node-name&gt;</pre><p>To update a node</p><pre>docker node update &lt;node-name&gt;</pre><h4>docker plugin</h4><p>To create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.</p><pre>docker plugin create &lt;plugin-name&gt; &lt;plugin-data-dir&gt;</pre><p>To disable a plugin</p><pre>docker plugin disable &lt;plugin-name&gt;</pre><p>To enable a plugin</p><pre>docker plugin enable &lt;plugin-name&gt;</pre><p>To display detailed information of a plugin</p><pre>docker plugin inspect &lt;plugin-name&gt;</pre><p>To install a plugin</p><pre>docker plugin install &lt;OPTIONS&gt; &lt;plugin-name&gt;</pre><p>To list plugins</p><pre>docker plugin ls<br>OR docker plugin list</pre><p>To push a plugin to a registry</p><pre>docker plugin push &lt;plugin-name:tag&gt;</pre><p>To remove a plugin</p><pre>docker plugin rm &lt;plugin-name&gt;</pre><p>To change settings for a plugin</p><pre>docker plugin set &lt;plugin-name&gt; KEY=VALUE</pre><h4>docker secret</h4><p>To create a secret from a file or STDIN as content</p><pre>docker secret create &lt;secret-name&gt; &lt;file-name&gt;</pre><p>To display detailed information of a secret</p><pre>docker secret inspect &lt;secret-name&gt;</pre><p>To list secrets</p><pre>docker secret ls<br>OR docker secret list</pre><p>To remove a secret</p><pre>docker secret rm &lt;secret-name&gt;</pre><h4>docker service</h4><p>To create a new service</p><pre>docker service create &lt;OPTIONS&gt; &lt;image-name&gt; &lt;CMD&gt;</pre><p>To display detailed information of a service</p><pre>docker service inspect &lt;service-name&gt;</pre><p>To list services</p><pre>docker service ls<br>OR docker service list</pre><p>To list the tasks of a service</p><pre>docker service ps &lt;service-name&gt;</pre><p>To remove a service</p><pre>docker service rm &lt;service-name&gt;</pre><p>To scale one or multiple replicated services</p><pre>docker service scale &lt;service-name&gt;=&lt;replicas&gt;</pre><p>To update a servicedoc</p><pre>docker service update &lt;OPTIONS&gt; &lt;service-name&gt;</pre><h4>docker stack</h4><p>To deploy a new stack or update an existing stack</p><pre>docker stack deploy -c &lt;compose-file&gt; &lt;stack-name&gt;</pre><p>To list stacks</p><pre>docker stack ls<br>OR docker stack list</pre><p>To list the tasks in the stack</p><pre>docker stack ps &lt;stack-name&gt;</pre><p>To remove the stack</p><pre>docker stack rm &lt;stack-name&gt;</pre><p>To list the services in the stack</p><pre>docker stack services &lt;stack-name&gt;</pre><h4>docker swarm</h4><p>To initialize a swarm</p><pre>docker swarm init &lt;OPTIONS&gt;</pre><p>To join a swarm as a node and/or manager</p><pre>docker swarm join &lt;OPTIONS&gt; &lt;HOST&gt;:&lt;PORT&gt;</pre><p>To manage join tokens</p><pre>docker swarm join-token &lt;OPTIONS&gt; worker/manager</pre><p>To leave the swarm</p><pre>docker swarm leave</pre><p>To unlock swarm</p><pre>docker swarm unlock</pre><p>To manage the unlock key</p><pre>docker swarm unlock-key</pre><p>To update the swarm</p><pre>docker swarm update &lt;OPTIONS&gt;</pre><h4>docker system</h4><p>To show docker disk usage</p><pre>docker system df</pre><p>To get real time events from the server</p><pre>docker system events</pre><p>To display system-wide information</p><pre>docker system info</pre><p>To remove unused data</p><pre>docker system prune</pre><h4>docker volume</h4><p>To create a volume</p><pre>docker volume create -d &lt;volume-driver-name&gt; &lt;volume-name&gt;</pre><p>To display detailed information of a volume</p><pre>docker volume inspect &lt;volume-name&gt;</pre><p>To list volumes</p><pre>docker volume ls</pre><p>To remove all unused volumes</p><pre>docker volume prune</pre><p>To remove a volume</p><pre>docker volume rm &lt;volume-name&gt;</pre><p>Source: ~ Docker CLI</p><p>Disclaimer: Content and image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3908d09ca455" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why use Docker for Development]]></title>
            <link>https://medium.com/@BeNitinAgarwal/why-use-docker-for-development-f3d1d1b61b05?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3d1d1b61b05</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Sun, 22 Jan 2017 14:08:48 GMT</pubDate>
            <atom:updated>2017-01-30T07:50:08.823Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*4NoQkS954xH92umboyysBg.png" /><figcaption>Image Source and Credits: <a href="http://paislee.io/the-ultimate-nodejs-development-setup-with-docker/">http://paislee.io/the-ultimate-nodejs-development-setup-with-docker/</a></figcaption></figure><p>In this blog, we’ll discuss why docker should be leveraged for local application development and testing.</p><p>Docker is not just for deployment, it’s a great tool for development too.</p><h4>Why use Docker for Development?</h4><p>Here’s some of the benefits of leveraging docker for development purposes.</p><ul><li>Consistent development environments for the entire team. All developers use the same OS, same system libraries, same language runtime, independent of the host OS. The development environment is exactly the same as the production environment.</li><li>If you’re having a hard time building / compiling the application code, then build it inside Docker. This primarily applies to developers using MacOS and Windows.</li><li>With application development using Docker, you don’t need to install a bunch of language environments on your system. You can simply run the ruby / python / java application inside docker container with the help of a Ruby /Python / JAVA Docker image respectively.</li><li>With Docker, you can use different versions of same programming language without having to resort to all the hack arounds for the language on your machine.</li><li>Deployment is easy. If it runs in your container, it will run on your server just the same. Just package up your code and deploy it on a server with the same image or push a new Docker image with your code in it and run that new image.</li><li>With the help of docker volumes, you can still use any editor/IDE of your choice as you normally do. You don’t need to run a VM and then ssh for development from the shell.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*1Pd_pYpcZOwRVrAXafZ42Q.png" /><figcaption>Image Source and Credits: <a href="http://paislee.io/the-ultimate-nodejs-development-setup-with-docker/">http://paislee.io/the-ultimate-nodejs-development-setup-with-docker/</a></figcaption></figure><p>Disclaimer: Image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3d1d1b61b05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Container’s Filesystem Demystified]]></title>
            <link>https://medium.com/@BeNitinAgarwal/docker-containers-filesystem-demystified-b6ed8112a04a?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6ed8112a04a</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Sun, 22 Jan 2017 11:33:38 GMT</pubDate>
            <atom:updated>2017-01-30T08:16:12.103Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*pvBxLhlnJ7w9FKPUpJfXkw.jpeg" /><figcaption>Image Source and Credits (Fabio Ferrari): <a href="http://www.slideshare.net/FabioFerrari31/docker-containers-talk-linux-day-2015">http://www.slideshare.net/FabioFerrari31/docker-containers-talk-linux-day-2015</a></figcaption></figure><p>In this blog, we’ll discuss about the Filesystem of Docker Containers in particular. Docker container is created from a readonly template called docker image.</p><h4>Docker Image</h4><p>Each Docker image references a list of read-only layers that represent filesystem differences. Layers are stacked on top of each other to form a base for a container’s root filesystem. The Docker storage driver is responsible for stacking these layers and providing a single unified view.</p><p>When we create a new container, we add a new &amp; thin writable layer on top of the underlying stack of layers present in the base docker image. All changes made to the running container, such as creating new files, modifying existing files or deleting files, are written to this thin writable container layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*dEFekHKo6WYE8O_eEH4ppA.jpeg" /><figcaption>Image Source and Credits (Rohit Jnagal): <a href="http://www.slideshare.net/RohitJnagal/docker-internals">http://www.slideshare.net/RohitJnagal/docker-internals</a></figcaption></figure><h4>Containers and Layers</h4><p>The major difference between a container and an image is the top writable layer. All writes to the container that add new or modify existing data are stored in this writable layer. When the container is deleted the writable layer is also deleted. The underlying image remains unchanged.</p><p>Because each container has its own thin writable container layer, and all changes are stored in this container layer, this means that multiple containers can share access to the same underlying image and yet have their own data state.</p><p>The Docker storage driver is responsible for enabling and managing both the image layers and the writable container layer. Two key technologies behind Docker image and container management are stackable image layers and copy-on-write (CoW).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*iS3p2S0KR9SbIiADgxooPA.jpeg" /><figcaption>Image Source and Credits (Hiroki Endo): <a href="http://pt.slideshare.net/endhrk/introduction-to-docker-36472476">http://pt.slideshare.net/endhrk/introduction-to-docker-36472476</a></figcaption></figure><h4>Copy on Write Strategy</h4><p>Copy-on-write is a similar strategy of sharing and copying, in which the system processes that need access to the same data share the same instance of that data rather than having their own copy. At some point, if any one process wants to modify or write to the data, only then does the operating system make a copy of the data for that process to use. Only the process that needs to write has access to the data copy. All other processes continue to use the original data.</p><p>Docker makes use of copy-on-write technology with both images and containers. This CoW strategy optimizes both image disk space usage and the performance of container start times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*MiBsCHj1aCyuBjw7_niYZA.jpeg" /><figcaption>Image Source and Credits: <a href="http://www.slideshare.net/dotCloud/introduction-to-docker-28459393">http://www.slideshare.net/dotCloud/introduction-to-docker-28459393</a></figcaption></figure><blockquote>Docker’s copy-on-write strategy not only reduces the amount of space consumed by containers, instead also reduces the time required to start a container. At start time, Docker only has to create the thin writable layer for each container.</blockquote><p>Source: ~ Docker Docs</p><p>Disclaimer: Content and image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6ed8112a04a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Docker Internals]]></title>
            <link>https://medium.com/@BeNitinAgarwal/understanding-the-docker-internals-7ccb052ce9fe?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ccb052ce9fe</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 12:38:14 GMT</pubDate>
            <atom:updated>2017-01-30T08:08:46.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*Zusvp8MI28yU27SVSG0wcA.png" /><figcaption>Image Source and Credits: <a href="https://delftswa.github.io/chapters/docker/">https://delftswa.github.io/chapters/docker/</a></figcaption></figure><p>Docker takes advantage of several features of the Linux kernel to deliver its functionality.</p><h4>Namespaces</h4><p>Docker makes use of kernel namespaces to provide the isolated workspace called the <em>container</em>. When you run a container, Docker creates a set of <em>namespaces</em> for that container. These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.</p><p>Docker Engine uses the following namespaces on Linux:</p><ul><li><strong>PID namespace</strong> for process isolation.</li><li><strong>NET namespace</strong> for managing network interfaces.</li><li><strong>IPC namespace</strong> for managing access to IPC resources.</li><li><strong>MNT namespace</strong> for managing filesystem mount points.</li><li><strong>UTS namespace </strong>for isolating kernel and version identifiers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*R7G3-B16rPo_Xld0FiQBQA.png" /><figcaption>Image Source and Credits (Rohit Jnagal): <a href="http://www.slideshare.net/RohitJnagal/docker-internals">http://www.slideshare.net/RohitJnagal/docker-internals</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*K3gLxv16AdcR2oaMEonreA.png" /><figcaption>Image Source and Credits (Rohit Jnagal): <a href="https://docs.google.com/presentation/d/1juVgXiLTM-ZmAmYBOshNwhBABkUqwIxVodHZwq-0eGg/edit?usp=sharing">https://docs.google.com/presentation/d/1juVgXiLTM-ZmAmYBOshNwhBABkUqwIxVodHZwq-0eGg/edit?usp=sharing</a></figcaption></figure><h4>Cgroups</h4><p>Docker also makes use of kernel control groups for resource allocation and isolation. A cgroup limits an application to a specific set of resources. Control groups allow Docker Engine to share available hardware resources to containers and optionally enforce limits and constraints.</p><p>Docker Engine uses the following cgroups:</p><ul><li><strong>Memory cgroup</strong> for managing accounting, limits and notifications.</li><li><strong>HugeTBL cgroup</strong> for accounting usage of huge pages by process group.</li><li><strong>CPU group</strong> for managing user / system CPU time and usage.</li><li><strong>CPUSet cgroup</strong> for binding a group to specific CPU. Useful for real time applications and NUMA systems with localized memory per CPU.</li><li><strong>BlkIO cgroup</strong> for measuring &amp; limiting amount of blckIO by group.</li><li><strong>net_cls</strong> and <strong>net_prio cgroup</strong> for tagging the traffic control.</li><li><strong>Devices cgroup</strong> for reading / writing access devices.</li><li><strong>Freezer cgroup</strong> for freezing a group. Useful for cluster batch scheduling, process migration and debugging without affecting prtrace.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*gVgi1TEvAF4ufVDr-LK4ZA.png" /><figcaption>Image Source and Credits (Rohit Jnagal &amp; Mairin): <a href="http://www.slideshare.net/RohitJnagal/docker-internals">http://www.slideshare.net/RohitJnagal/docker-internals</a> and <a href="https://mairin.wordpress.com/2011/05/13/ideas-for-a-cgroups-ui/">https://mairin.wordpress.com/2011/05/13/ideas-for-a-cgroups-ui/</a></figcaption></figure><h4>Union File Systems</h4><p>Union file systems operate by creating layers, making them very lightweight and fast. Docker Engine uses UnionFS to provide the building blocks for containers. Docker Engine can use multiple UnionFS variants, including AUFS, btrfs, vfs, and devicemapper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*EFssPAwoLd67AgbafmTx5A.png" /><figcaption>Image Source and Credits (Rohit Jnagal): <a href="http://www.slideshare.net/RohitJnagal/docker-internals">http://www.slideshare.net/RohitJnagal/docker-internals</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*9BmNU66OJXjHsMhtnSIArA.png" /><figcaption>Image Source and Credits (Jerome Petazzoni): <a href="http://www.slideshare.net/RohitJnagal/docker-internals">http://www.slideshare.net/RohitJnagal/docker-internals</a></figcaption></figure><h4>Container Format</h4><p>Docker Engine combines the namespaces, control groups and UnionFS into a wrapper called a container format. The default container format is libcontainer.</p><h4>Security</h4><p>Docker Engine makes use of AppArmor, Seccomp, Capabilities kernel features for security purposes.</p><ul><li><strong>AppArmor </strong>allows to restrict programs capabilities with per-program profiles.</li><li><strong>Seccomp</strong> used for filtering syscalls issued by a program.</li><li><strong>Capabilties</strong> for performing permission checks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*kMDpwnObSaO-EEFhFdMFXQ.png" /><figcaption>Image Source and Credits (Leo Reynolds): <a href="http://www.slideshare.net/RohitJnagal/docker-internals">http://www.slideshare.net/RohitJnagal/docker-internals</a></figcaption></figure><p>Source: ~ <a href="http://docker-saigon.github.io/post/Docker-Internals/">http://docker-saigon.github.io/post/Docker-Internals/</a></p><p>Disclaimer: Content and Image source has been mentioned. Special credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ccb052ce9fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lifecycle of Docker Container]]></title>
            <link>https://medium.com/@BeNitinAgarwal/lifecycle-of-docker-container-d2da9f85959?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2da9f85959</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 10:16:33 GMT</pubDate>
            <atom:updated>2017-01-30T08:10:49.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vca4e-SjpzSL5H401p4LCg.png" /><figcaption>Image Source and Credits: <a href="http://docker-saigon.github.io/post/Docker-Internals/">http://docker-saigon.github.io/post/Docker-Internals/</a></figcaption></figure><p>Though the above pic is self explanatory, we’ll just discuss the basics / CLI commands for working with docker containers.</p><h4>Create container</h4><p>Create a container to run it later on with required image.</p><pre>docker create --name &lt;container-name&gt; &lt;image-name&gt;</pre><h4>Run docker container</h4><p>Run the docker container with the required image and specified command / process. ‘-d’ flag is used for running the container in background.</p><pre>docker run -it -d --name &lt;container-name&gt; &lt;image-name&gt; bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*obzu32ZsInRqCr1mrQb5lA.jpeg" /><figcaption>Image Source and Credits: <a href="http://www.slideshare.net/w_akram/docker-introduction-59904719">http://www.slideshare.net/w_akram/docker-introduction-59904719</a></figcaption></figure><h4>Pause container</h4><p>Used to pause the processes running inside the container.</p><pre>docker pause &lt;container-id/name&gt;</pre><h4>Unpause container</h4><p>Used to unpause the processes inside the container.</p><pre>docker unpause &lt;container-id/name&gt;</pre><h4>Start container</h4><p>Start the container, if present in stopped state.</p><pre>docker start &lt;container-id/name&gt;</pre><h4>Stop container</h4><p>To stop the container and processes running inside the container:</p><pre>docker stop &lt;container-id/name&gt;</pre><p>To stop all the running docker containers</p><blockquote>docker stop $(docker ps -a -q)</blockquote><h4>Restart container</h4><p>It is used to restart the container as well as processes running inside the container.</p><pre>docker restart &lt;container-id/name&gt;</pre><h4>Kill container</h4><p>We can kill the running container.</p><pre>docker kill &lt;container-id/name&gt;</pre><h4>Destroy container</h4><p>Its preferred to destroy container, only if present in stopped state instead of forcefully destroying the running container.</p><pre>docker rm &lt;container-id/name&gt;</pre><p>To remove all the stopped docker containers</p><blockquote>docker rm $(docker ps -q -f status=exited)</blockquote><p>Source: ~ Docker CLI</p><p>Disclaimer: Content and image source has been mentioned. Special credits to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2da9f85959" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Init System inside the Docker Container]]></title>
            <link>https://medium.com/@BeNitinAgarwal/an-init-system-inside-the-docker-container-3821ee233f4b?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3821ee233f4b</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 09:15:46 GMT</pubDate>
            <atom:updated>2017-01-30T08:35:48.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*JkcbzFj9oYlV4ncmbejddw.png" /><figcaption>Image Source and Credits: <a href="http://www.studytonight.com/operating-system/process-scheduling">http://www.studytonight.com/operating-system/process-scheduling</a></figcaption></figure><p>In this blog, we’ll understand the PID 1 zombie reaping problem and how it can be solved with the help of init system inside the docker container. Though we have the ideal fact “one process one container” but most often we end up running few processes inside the container such as logging and monitoring agent.</p><p>As of today Docker does not run processes under a init process that properly reaps child processes, so it is indeed possible for the container to end up with zombie processes that cause all sorts of trouble.</p><h4>Init Process</h4><p>It is the top-most process started by the kernel when the system is booted. The init process is responsible for starting the rest of the system, such as starting the SSH daemon, starting Apache/Nginx, etc. Each of them may in turn spawn further child processes.</p><blockquote>Each process can spawn child processes, and each process has a parent except for the top-most process.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*vSC25lkofdrvMNZqt1l7tA.jpeg" /><figcaption>Image Source and Credits: <a href="http://slideplayer.com/slide/6931177/">http://slideplayer.com/slide/6931177/</a></figcaption></figure><h4>Zombie</h4><p>A child that terminates, but has not been waited for becomes a “zombie”. The kernel maintains a minimal set of information about the zombie process (PID, termination status, resource usage information) in order to allow the parent to later perform a wait to obtain information about the child.</p><blockquote>The action of calling waitpid() on a child process in order to eliminate its zombie, is called &quot;reaping&quot;.</blockquote><h4>Why Zombie processes are harmful</h4><p>As long as a zombie is not removed from the system via a wait, it will consume a slot in the kernel process table, and if this table fills, it will not be possible to create further processes.</p><h4>Relationship with Docker</h4><p>Well, we see many folks run only one process in one container and they think that when they run this single process, they’re done. But most likely, this process will not behave like a proper init process. In other words, instead of properly reaping adopted processes, it expects another init process to do that job and rightly so.</p><p>Let’s look at a concrete example. Suppose you run a web server inside the container which runs bash script. Now, this bash script calls perl. Then the web server decides that the script is taking too long and kills the script, but perl is not affected and keeps running. When perl finishes, it becomes a zombie and is adopted by the PID 1 (the web server). The web server doesn’t know about perl, so it doesn’t reap it and the perl zombie stays in the system.</p><p>We see many folks often create Docker containers for third party applications (MongoDB, MySQL, Apache) and run their applications as the sole process inside the container. You’re running someone elses code, so you can’t be really sure that those applications <em>don’t</em> spawn processes in such a way that they become zombies later.</p><p>So, to avoid this, there is a need to run a proper init system inside the docker container.</p><p>A simple init system is to use bash inside the docker container.</p><pre>CMD [&quot;/bin/bash&quot;, &quot;-c&quot;, &quot;set -e &amp;&amp; /path-to-your-app&quot;]</pre><p>Though, bash properly reaps the adopted child processes, it doesn’t handle signals properly. Suppose that you use kill to send a SIGTERM signal to bash. Bash terminates, but does <em>not</em> send SIGTERM to its child processes.</p><blockquote><em>docker stop sends SIGTERM to the init process. &quot;docker stop&quot; should stop the container cleanly so that you can start it later with &quot;docker start&quot;.</em></blockquote><p>When bash terminates, the kernel terminates the entire container with all processes inside. These processes are terminated <em>uncleanly</em> through the SIGKILL signal. Suppose your app is running busy writing a file; the file could get corrupted if the app is terminated uncleanly.</p><p>Unfortunately, sending signals to child processes is not enough. The init process must also <em>wait</em> for child processes to terminate, before terminating itself. If the init process terminates prematurely then all children are terminated uncleanly by the kernel.</p><p>So clearly a more sophisticated init system (running with PID 1 inside container) is required to solve the below issues:</p><ul><li>Inherit orphaned child processes and must reap them</li><li>Handle signals properly</li><li>Waits until all subprocesses are terminated before terminating itself</li></ul><p>There are many init systems available for the containers, such as dumb-init, supervisord and others.</p><p>Source: ~ <a href="https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/">https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/</a></p><p>Disclaimer: Content and Image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3821ee233f4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Usecases]]></title>
            <link>https://medium.com/@BeNitinAgarwal/docker-usecases-3b62f4d68bc4?source=rss-774ed69dac1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b62f4d68bc4</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nitin Agarwal]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 06:16:19 GMT</pubDate>
            <atom:updated>2017-01-30T08:32:46.863Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*f3Sa-ZnPu-COxeEiJE-Tcw.png" /><figcaption>Image Source and Credits: <a href="http://blog.flux7.com/blogs/docker/8-ways-to-use-docker-in-the-real-world">http://blog.flux7.com/blogs/docker/8-ways-to-use-docker-in-the-real-world</a></figcaption></figure><p>Docker provides lightweight virtualization with almost zero overhead. Primarily, you can benefit from an extra layer of abstraction offered by Docker without having to worry about the overhead. Many containers can be run on a single machine than with virtualization alone. Containers can be started and stopped within milliseconds.</p><p>In summary, Docker’s functionality falls into several categories:</p><ul><li>Portable deployment of applications</li><li>Support for automatic building of docker images</li><li>Built-in version tracking</li><li>Registry for sharing images</li><li>A growing tools ecosystem from the docker API</li><li>Consistency among different environments</li><li>Efficient utilisation of resources</li></ul><p>The feature that really sets Docker apart, is the layered file system and the ability to apply version control to entire containers. The benefits of being able to track, revert and view changes is a highly desirable and widely-used feature in software development. Docker extends that same idea to a higher construct; the entire application, with all its dependencies in a single environment.</p><p>Here are just some of the use cases that provide a consistent environment at low overhead with the enabling technology of Docker.</p><h4>Simplifying Configuration</h4><p>Docker provides the ability to run any platform with its own config on top of any infrastructure without the overhead of a virtual machine. Docker lets you put the configuration files into code as well as pass via env variables for different environments and deploy it. Hence, the same docker image can be used in different environments. This decouples infrastructure requirements from the application environment.</p><h4>Code Pipeline Management</h4><p>The simplification of configuration makes a large impact in managing the code pipeline. As the code travels from the developer’s machine to production, there are many different environments it has to go through to get there. Each of these may have minor differences along the way.</p><p>Docker provides a consistent environment for the application from dev through production, easing the code development and deployment pipeline. The immutable nature of Docker images, and the ease with which they can be spun up, help you achieve zero change in application runtime environments across dev through production.</p><h4>Developer Productivity</h4><p>In development environment, basically we need to achieve two major goals. One, we want the development environment to be as close as possible to production and secondly, we want the development environment to be as fast as possible for interactive use.</p><p>To achieve the first goal, we need to have every service running on its own VM to reflect how the production application runs. Docker’s low overhead easily allows a few dozen services to run inside different containers on the development environment which usually has a low memory capacity.</p><p>To achieve the second goal, we make use of docker’s shared volumes to make the application code available to the container from the host OS. This way, the developer can edit the source code from his platform &amp; editor of choice and is able to see the changes right away as the applications run using the same source code with the running environment set inside Docker container.</p><h4>App Isolation</h4><p>There are cases where you need to have isolation among applications are server consolidation for decreasing cost or a plan to separate a monolithic application into decoupled pieces. For example, you might need to run two REST API servers, both of which require apache. But, each of them uses a slightly different version of apache and other such dependencies. Running these API servers under different containers provides an easy way out through what we call the “dependency hell”.</p><h4>Server Consolidation</h4><p>The application isolation abilities of Docker allows consolidating multiple servers to save on cost without the memory footprint of multiple OSes and the ability to share unused memory across the instances. Docker provides far denser server consolidation as compared to VMs.</p><h4>Debugging Capabilities</h4><p>Docker provides many tools that are not necessarily specific to containers, but, they work well with the concept of containers, such as the ability to checkpoint containers and container versions, as well as to diff two containers which is immensely useful in fixing an application.</p><h4>Multi-tenancy</h4><p>Another use case of Docker is its use in multi-tenant applications, thereby avoiding major application rewrites. For example is to develop quick and easy multi-tenancy for an IoT application. Code bases for such multi-tenant applications are far more complicated, rigid and difficult to handle. Rearchitecting an application is not only time consuming, but also costs a lot of money.</p><p>Using Docker, it was easy and inexpensive to create isolated environments for running multiple instances of app tiers for each tenant. This was possible given the spin up speed of Docker environments and it’s easy-to-use API, which we can use to spin containers programmatically.</p><h4>Rapid Deployment</h4><p>Docker containers can be created and up in milliseconds. This is achieved by containers by not booting up an OS and just running the application process. Moreover, the immutable nature of Docker images gives you the peace of mind that things will work exactly the way they have been working and are supposed to work.</p><p>Source: ~ <a href="https://www.airpair.com/docker/posts/8-proven-real-world-ways-to-use-docker">https://www.airpair.com/docker/posts/8-proven-real-world-ways-to-use-docker</a></p><p>Disclaimer: Content and Image source has been mentioned. Special Credit to concerned folks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b62f4d68bc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>