<?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 Abhay Vishwakarma on Medium]]></title>
        <description><![CDATA[Stories by Abhay Vishwakarma on Medium]]></description>
        <link>https://medium.com/@abhayvishwakarma800?source=rss-731ce944b57f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*339Sk2ceaSW3QmAVD5E5mA@2x.jpeg</url>
            <title>Stories by Abhay Vishwakarma on Medium</title>
            <link>https://medium.com/@abhayvishwakarma800?source=rss-731ce944b57f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 14:16:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhayvishwakarma800/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[Day-22 : Getting Started with Jenkins.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-22-getting-started-with-jenkins-907a80075b5c?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/907a80075b5c</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 12:55:00 GMT</pubDate>
            <atom:updated>2023-02-09T12:55:00.081Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>Day-22 : Getting Started with Jenkins.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*FA1CPQR-i8eFi4HXLK9jZg.jpeg" /></figure><h3>• What is Jenkins..?</h3><ul><li>Jenkins is a popular open-source automation server that helps to automate various stages of the software development process. It provides a platform for building, testing, and deploying software projects, and it supports a wide range of tools and technologies.</li><li>With Jenkins, you can automate tasks such as building and testing code, creating and deploying artifacts, and monitoring the status of your builds. Jenkins has a web-based interface that provides access to various features, such as build history, logs, and artifacts, as well as a plug-in architecture that allows you to extend the capabilities of the system. It also integrates with a variety of version control systems, including Git, and it supports multiple build systems, such as Apache Ant and Maven. The versatility and ease-of-use of Jenkins makes it a popular choice for organizations of all sizes, helping to streamline the software development process and improve the efficiency and reliability of their delivery pipeline.</li><li>Jenkins achieves Continuous Integration with the help of plugins. Plugins allow the integration of Various DevOps stages. If you want to integrate a particular tool, you need to install the plugins for that tool. For example Git, Maven 2 project, Amazon EC2, HTML publisher etc.</li></ul><blockquote><strong><em>Tasks:</em></strong></blockquote><ol><li><strong>What you understood in Jenkin, write a small article in your own words.</strong></li></ol><p>Jenkins is an open-source automation tool that helps developers to automate the building, testing, and deployment of software projects. It provides a user-friendly interface that allows users to create and manage jobs, which are essentially scripts or commands that run on a schedule or when triggered by an event. Jenkins also supports integration with a variety of tools and plugins, such as Git, Maven, and JUnit, to provide a complete continuous integration and continuous delivery (CI/CD) solution. With Jenkins, developers can easily automate repetitive tasks, catch errors early, and ensure that their code is always in a releasable state.</p><p>2. <strong>Create a freestyle pipeline to print “Hello World!!</strong></p><p><strong>First do setting up Jenkins on your EC2 Instance.</strong></p><p><em>Step 1 : Update your system.</em></p><pre>sudo apt update</pre><p><em>Step 2 : Install java using command.</em></p><pre>sudo apt install openjdk-11-jre</pre><p><em>Step 3 : To check Java Installation.</em></p><pre>java -version</pre><p><em>Step 4 : Install Jenkins.</em></p><p><em>[Just copy these commands and paste them onto your terminal….!]</em></p><pre>* curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc &gt; /dev/null<br>* echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list &gt; /dev/null<br>* sudo apt-get update<br>* sudo apt-get install jenkins</pre><p><em>Step 5 : Start Jenkins.</em></p><pre>* sudo systemctl enable jenkins<br>* sudo systemctl start jenkins<br>* sudo systemctl status Jenkins</pre><p><em>Step 6 : Add port number 8080 in your system. And search in browser “</em><strong><em>localhost:8080</em></strong><em>&quot;.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dx0a3N0pgVEA3maABO2gsw.png" /></figure><p><em>Step 7 : Copy the password path and go to your terminal and run it using cat command.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*ggotVUeRHoCcDdaG9cF_0g.png" /></figure><p><em>Step 8: Copy the password and run it in browse.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*A0H4kuoN5jnQgK8x.png" /></figure><p><em>Step 9 : Create a First Admin User and save it.</em></p><p><em>Step 10 : Copy this url and past it in new tab and save it.</em></p><p><em>[Jenkins Successfully setting up is done.]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*gJRZGsxty9Vp1Rr1.png" /></figure><ul><li><strong>Create a freestyle pipeline to print “Hello World!! , follow these steps :</strong></li></ul><p><em>Step 1 : Log in to your Jenkins instance and click on the “New Item” button.</em></p><p><em>Step 2 : Give your pipeline a name “Hello-World” and select “Freestyle project” as the type, then click on the “OK” button.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*0rxc7XO-sEl9sCpH.png" /></figure><p><em>Step 3 : In the “Build” section, click on the “Add build step” button and select “Execute shell” option. In the “Command” field, enter the following command :</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*NLJKsFIpjorBQGJ_.png" /></figure><p><em>Step 4 : Click on the “Save” button to create the pipeline.</em></p><p><em>Step 5 : Click on the “Build Now” button to run the pipeline and see the output.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*YUz-FSfb_4AzSl3UU7qz6Q.png" /></figure><p><em>This pipeline will execute a single build step which will print the message “Hello World!!” when pipeline is built.</em></p><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><ul><li><a href="https://medium.com/@abhayvishwakarma800/day-21-task-docker-important-interview-questions-662a386947c9">Day 21 Task: Docker Important interview Questions.</a></li><li><a href="https://medium.com/@abhayvishwakarma800/day-20-task-docker-cheat-sheet-94816e32e92e">Day 20 Task: Docker Cheat-Sheet.</a></li><li><a href="https://medium.com/@abhayvishwakarma800/day-18-docker-for-devops-engineers-1f85a20610b3">Day 18 — Docker for DevOps Engineers.</a></li><li><a href="https://medium.com/@abhayvishwakarma800/day-17-docker-project-for-devops-engineers-691099bfcb9e">Day 17 : Docker Project for DevOps Engineers.</a></li><li><a href="https://medium.com/@abhayvishwakarma800/day-1-getting-started-with-devops-9f6984d6281">Day-1 :Getting started with DevOps</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=907a80075b5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 21 Task: Docker Important interview Questions.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-21-task-docker-important-interview-questions-662a386947c9?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/662a386947c9</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 13:05:07 GMT</pubDate>
            <atom:updated>2023-02-07T13:05:07.473Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q9vnZSxp7N27izE0Rk1BvA.png" /></figure><h3>• <strong>What is the Difference between an Image, Container and Engine..?</strong></h3><ul><li><strong><em>Image :</em></strong> Docker Image is an executable package of software that includes everything needed to run an application. This image informs how a container should instantiate, determining which software components will run and how.</li><li><strong><em>Container :</em></strong> Docker container is a virtual environment that bundles application code with all the dependencies required to run the application. The application runs quickly and reliably from one computing environment to another.</li><li><strong><em>Engine : </em></strong>Docker Engine is an open source containerization technology for building and containerizing your applications. Docker Engine acts as a client-server application.</li></ul><h3>• <strong>What is the Difference between the Docker command COPY vs ADD..?</strong></h3><p>The <strong>COPY</strong> command is used to copy files from the host system to the container, while the <strong>ADD </strong>command can do the same but also supports file compression and URL sources.</p><h3>• <strong>What is the Difference between the Docker command CMD vs RUN..?</strong></h3><p>The <strong>CMD</strong> command is used to specify the default command that should be executed when a container is started from an image. This command can be overridden when starting a container, which means that it does not have to be executed every time a container is started.</p><p>The <strong>RUN</strong> command, on the other hand, is used to execute a command during the image building process. It will run command(s) in a new layer on top of the current image and commit the results. The command(s) in a RUN instruction will always be executed when the image is being built.</p><h3>• <strong>How Will you reduce the size of the Docker image..?</strong></h3><p>To reduce the size of a Docker image, you can use multi-stage builds, remove unnecessary files and dependencies, and use smaller base images.</p><ul><li><strong><em>Multi-stage builds :</em></strong> Use multiple Dockerfiles in a multi-stage build process to only include the final required artifacts in the final image, discarding intermediate build artifacts and unused files.</li><li><strong><em>Use smaller base images :</em></strong> Select base images with the smallest possible size, for example, using Alpine Linux instead of full-featured distributions like Ubuntu.</li></ul><h3>• <strong>Why and when to use Docker..?</strong></h3><p>Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.</p><h3>• <strong>Explain the Docker components and how they interact with each other..?</strong></h3><p><strong>-</strong> Docker has several components, including the Docker daemon, which manages the creation and management of containers, the Docker client, which communicates with the daemon to issue commands, and the Docker registry, which stores and distributes images.</p><ul><li><strong><em>Docker Daemon : </em></strong>The Docker Daemon is the core component of Docker, responsible for building, running, and managing containers. It communicates with other components through the Docker API.</li><li><strong><em>Docker CLI : </em></strong>The Docker CLI is a command-line interface for interacting with the Docker Daemon. Users can use the CLI to build, run, and manage containers.</li></ul><h3>• <strong>Explain the terminology: Docker Compose, Docker File, Docker Image, Docker Container..?</strong></h3><ul><li><strong><em>Docker File:</em></strong> A Docker File is a script that contains instructions for building a Docker Image. It specifies the base image, files to be copied, and commands to run when building the image.</li><li><strong><em>Docker compose :</em></strong> It is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.</li><li><strong><em>Docker image :</em></strong> A Docker Image is a snapshot of a file system that contains all the files and dependencies needed to run an application. It is created from a Docker File and can be used to create new containers.</li><li><strong><em>Docker Container : </em></strong>A container is a runtime instance of a docker image A Docker container consists of A Docker image An execution environment A standard set of instructions.</li></ul><h3>• <strong>In what real scenarios have you used Docker..?</strong></h3><p>I have used Docker in a variety of scenarios including development, CI/CD, microservices architecture, testing and staging, production, virtualization of legacy app, big data and data science environment. It allows for consistency and reproducibility in builds, easy scaling and management of applications, and efficient use of system resources.</p><h3>• <strong>Docker vs Hypervisor..?</strong></h3><ul><li><strong><em>Docker :</em></strong> Docker is designed for application virtualization, where each application runs in its own container. Containers share the host operating system, making them lightweight and efficient. Docker is ideal for microservices and cloud-based deployments.</li><li><strong><em>Hypervisor : </em></strong>A hypervisor is a layer of software that allows multiple virtual machines to run on a single physical machine. Each virtual machine runs its own operating system and has its own resources, making it ideal for server virtualization and multi-tenant environments.</li></ul><h3>• <strong>What are the advantages and disadvantages of using docker..?</strong></h3><ul><li><strong><em>Advantages of using Docker:</em></strong></li></ul><p><strong>1. Portability: </strong>Docker containers can run on any system that supports the Docker engine, making it easy to move applications between environments.</p><p><strong>2. Isolation: </strong>Docker containers provide a level of isolation between applications, which can help prevent conflicts between dependencies and reduce the risk of security vulnerabilities.</p><p><strong>3. Resource efficiency:</strong> Docker containers are lightweight and consume fewer resources than virtual machines, which can help reduce costs and improve performance.</p><p><strong>4. Scalability:</strong> Docker makes it easy to scale applications by adding or removing containers as needed.</p><p><strong>5. Automation:</strong> Docker allows you to automate the process of building, testing, and deploying applications, which can help to improve the efficiency of the software development life cycle.</p><p><strong>6. Microservices:</strong> Docker helps in implementing a microservices architecture, allowing you to break down a monolithic application into smaller, loosely-coupled services.</p><ul><li><strong><em>Disadvantages of using Docker:</em></strong></li></ul><p><strong>1. Complexity:</strong> Setting up and managing a Docker environment can be complex, especially for large, complex applications.</p><p><strong>2. Security: </strong>Docker containers share the host’s kernel, which can make it easier for attackers to compromise the host and gain access to the containers.</p><p><strong>3. Volume management:</strong> Docker does not provide built-in volume management, which can make it difficult to manage data volumes across containers.</p><p><strong>4. Limited Windows support:</strong> Windows support for Docker is not as robust as Linux support, which can make it more difficult to run Windows-based applications in a container.</p><p><strong>5. Networking: </strong>Docker networking can be complex and may require additional configuration to work properly.</p><h3>• <strong>What is a Docker namespace..?</strong></h3><p>A Docker namespace is a virtualized environment for certain system resources, such as network interfaces, that is used to isolate containers from one another.</p><h3>• <strong>What is a Docker registry..?</strong></h3><p>A Docker registry is a service that stores and distributes Docker images, and it allows users to upload, download, and manage their own images. It can be either public or private, and it can support different authentication and authorization mechanisms to control access to the images.</p><h3>• <strong>What is an entry point..?</strong></h3><p>An entry point is a command that is run when a container is started from an image.</p><h3>• <strong>How to implement CI/CD in Docker..?</strong></h3><p><strong><em>CI/CD</em></strong><em> (Continuous Integration/Continuous Deployment) in Docker can be implemented by following these steps:</em></p><p><strong>1. Build: </strong>Use a continuous integration tool, such as Jenkins, Travis CI or CircleCI, to automatically build a Docker image from the source code whenever there are changes to the codebase. This can be done by using a Dockerfile to define the image and using the CI tool to run the docker build command.</p><p><strong>2. Test:</strong> Run automated tests on the built image to ensure that the application is functioning correctly. This can be done by starting a container from the image and running the tests inside the container.</p><p><strong>3. Push:</strong> Push the built image to a Docker registry, such as Docker Hub, so that it can be easily accessed by the deployment environment.</p><p><strong>4. Deploy:</strong> Use a continuous deployment tool, such as Kubernetes or Docker Swarm, to deploy the image to the production environment. This can be done by pulling the image from the registry and starting a container from it.</p><p><strong>5. Monitor:</strong> Monitor the deployed containers to ensure that they are running correctly and that there are no issues with the application. This can be done by using tools such as Prometheus or Elasticsearch, Logstash and Kibana.</p><h3>• <strong>Will data on the container be lost when the docker container exits..?</strong></h3><p>Data stored on a container will be lost when the container is removed, unless steps are taken to preserve it. By default, when a container is removed, all data stored in the container’s file system is also removed.</p><h3>• <strong>What is a Docker swarm..?</strong></h3><p>A Docker Swarm is a group of either physical or virtual machines that are running the Docker application and that have been configured to join together in a cluster.</p><p>The activities of the cluster are controlled by a swarm manager, and machines that have joined the cluster are referred to as nodes.</p><h3>• <strong>What are the docker commands for the following :</strong></h3><ul><li><em>To view running containers :</em></li></ul><pre>docker ps</pre><ul><li><em>To run the container under a specific name :</em></li></ul><pre>docker run --name &lt;name&gt; &lt;image&gt;</pre><ul><li><em>Export a docker container :</em></li></ul><pre>docker export &lt;container&gt; &gt; &lt;filename&gt;</pre><ul><li><em>To import an already existing docker image :</em></li></ul><pre>docker import &lt;filename&gt; &lt;repository:tag&gt;</pre><ul><li><em>To delete a container :</em></li></ul><pre>docker rm &lt;container&gt;</pre><ul><li><em>Command to remove all stopped containers, unused networks, build caches, and dangling images :</em></li></ul><pre>docker system prune</pre><h3>• <strong>What are the common docker practices to reduce the size of Docker Images..?</strong></h3><p>Here Common practices to reduce the size of Docker images include: using multi-stage builds, removing unnecessary files and dependencies, using smaller base images, using a .dockerignore file, squashing multiple layers, using a caching mechanism, version pinning and using image scanning and vulnerability analysis tools. While these practices can help reduce the size of images, it’s important to consider the impact on the functionality of the application.</p><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=662a386947c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 20 Task: Docker Cheat-Sheet.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-20-task-docker-cheat-sheet-94816e32e92e?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/94816e32e92e</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker-command]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 13:05:40 GMT</pubDate>
            <atom:updated>2023-02-06T13:08:47.904Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*vCy5kL1O64SnLfSs" /></figure><h3>• <strong>Commands to setup docker in EC2 :</strong></h3><pre>* sudo yum update -y<br><br>* sudo amazon-linux-extras install docker<br><br>* sudo service docker start<br><br>* sudo systemctl enable docker<br><br>* sudo usermod -a -G docker ec2-user  (Permissions denied)</pre><h3>• General Management :</h3><p><em>*It will allow you to obtain general information about the system and connect to remote Docker resources.</em></p><ul><li>To log / logout in to a Docker registry :</li></ul><pre>docker login<br>docker logout</pre><ul><li>To show the version of the local Docker installation :</li></ul><pre>docker version</pre><ul><li>Display information about the system :</li></ul><pre>docker info</pre><h3>• Container Management :</h3><p>*<em>Here we show how to create, manage, and remove containers from your Docker system.</em></p><ul><li>To see the containers currently running on the system :</li></ul><pre>docker ps</pre><ul><li>To see all the containers, both running and non-running :</li></ul><pre>docker ps -a</pre><ul><li>To create a container :</li></ul><pre>docker create [image]</pre><ul><li>To rename an existing container :</li></ul><pre>docker rename [container] [new_name]</pre><ul><li>Delete a container :</li></ul><pre>docker rm [container]</pre><ul><li>To view logs for a running container :</li></ul><pre>docker logs [container]</pre><ul><li>Update the configuration of one or more containers :</li></ul><pre>docker update [container]</pre><ul><li>To view port mapping for a container :</li></ul><pre>docker port [container]</pre><ul><li>To show running processes in a container :</li></ul><pre>docker top [container]</pre><ul><li>To view live resource usage statistics for a container :</li></ul><pre>docker stats [container]</pre><ul><li>To show changes to files or directories on the filesystem :</li></ul><pre>docker diff [container]</pre><ul><li>To copy a local file to a directory in a container :</li></ul><pre>docker cp [file-path] CONTAINER:[path]</pre><h3>• Running a Container :</h3><p><em>*Here a commands show you how to start and stop processes in a container.</em></p><ul><li>Run a command in a container based on an image :</li></ul><pre>docker run [image] [command]</pre><ul><li>To establish a connection with a container by mapping a host port to a container port :</li></ul><pre>docker run -p [host-port]:[container-port] [image]</pre><ul><li>To start / Stop / restart / wait / kill / attach a container :</li></ul><pre>docker start [container]<br>docker stop [container]<br>docker restart [container]<br>docker wait [container]<br>docker kill [container]<br>docker attach [container]</pre><h3>• Image Management :</h3><p><em>*Here a commands for working with </em><a href="https://phoenixnap.com/kb/create-docker-images-with-dockerfile"><em>Docker images</em></a><em>.</em></p><ul><li>Create an image from a Dockerfile. And docker build [dockerfile-path].</li></ul><pre>docker build [dockerfile-path]<br>docker build .</pre><ul><li>Create an image from a Dockerfile and tag it.</li></ul><pre>docker build -t [name]:[tag] [dockerfile-path]</pre><ul><li>To Pull / Push / history an image from a registry :</li></ul><pre>docker pull [image]<br>docker push [image]<br>docker history [image]</pre><ul><li>Remove unused images :</li></ul><pre>docker image prune</pre><h3>• Plugin Management :</h3><ul><li>To enable / disable a Docker plugin :</li></ul><pre>docker plugin enable [plugin]<br>docker plugin disable [plugin]</pre><ul><li>Create a plugin from <strong>config.json</strong> and <strong>rootfs </strong>:</li></ul><pre>docker plugin create [plugin] [path-to-data]</pre><ul><li>To docker plugin create [plugin] [path-to-data].</li></ul><pre>docker plugin rm [plugin]</pre><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><p>*References :-</p><p><em>!If you want more info then visit here….</em><strong><em>“</em></strong><a href="https://drive.google.com/file/d/1xqeUyAIh2x5txESy4SXV-QDXb3-UgvG4/view?usp=sharing"><strong><em>Docker Cheat Sheet</em></strong></a><strong><em>”……..!!!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94816e32e92e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 19 : Docker for DevOps Engineers]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-19-docker-for-devops-engineers-7f9a2a4da099?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f9a2a4da099</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[volume]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 12:12:44 GMT</pubDate>
            <atom:updated>2023-02-04T13:37:29.262Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>Day 19 : Docker for DevOps Engineers</h3><h3>• Docker-Volume :</h3><p>Docker allows you to create something called volumes. Volumes are like separate storage areas that can be accessed by containers. They allow you to store data, like a database, outside the container, so it doesn’t get deleted when the container is deleted. You can also mount from the same volume and create more containers having same data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eOT9KFQzDWeSBjoJgKCcUw.jpeg" /></figure><h3>• Docker Network :</h3><p>Docker allows you to create virtual spaces called networks, where you can connect multiple containers (small packages that hold all the necessary files for a specific application to run) together. This way, the containers can communicate with each other and with the host machine (the computer on which the Docker is installed). When we run a container, it has its own storage space that is only accessible by that specific container. If we want to share that storage space with other containers, we can’t do that.</p><blockquote><strong><em>Task-1 :</em></strong></blockquote><p><strong>· Create a multi-container docker-compose file which will bring <em>UP</em> and bring <em>DOWN</em> containers in a single shot (Example — Create application and database container )</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*9Otn_TtpEmnvF5GE3CiU0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*qdFou82_zkdlSwO--bkglQ.png" /></figure><p><strong>· Use the docker-compose up command with the -d flag to start a multi-container application in detached mode.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SKYt7a3SUubhQYVa50Asg.png" /></figure><p><strong>· Use the docker-compose scale command to increase or decrease the number of replicas for a specific service. You can also add replicas in deployment file for <em>auto-scaling</em>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3vuCr1ix4pWzq4seDf_jAA.png" /></figure><p><strong>· Use the docker-compose ps command to view the status of all containers</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*dO-IalX8i9wbpcImLAonCw.png" /></figure><p><strong>· Use docker-compose logs to view the logs of a specific service.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*4g0CEHqQ2d8xFHRQeoXoHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*FM2IatwUnjHTducwnxb9vw.png" /></figure><p><strong>· Use the docker-compose down command to stop and remove all containers, networks, and volumes associated with the application</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*MdJqtDJJYrdEjxkSOdPuCg.png" /></figure><blockquote><strong><em>Task-2 :</em></strong></blockquote><p><strong>· Learn how to use Docker Volumes and Named Volumes to share files and directories between multiple containers.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*CNkkmy1c7l2kNY8_xgP8yg.png" /></figure><p><strong>· Use the docker volume ls command to list all volumes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*M_qv73FK9E_YuNwTUy_5Pw.png" /></figure><p><strong>· Use the docker volume rm command to remove the volume when you’re done.</strong></p><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f9a2a4da099" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 18 — Docker for DevOps Engineers.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-18-docker-for-devops-engineers-1f85a20610b3?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f85a20610b3</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 17:41:03 GMT</pubDate>
            <atom:updated>2023-02-04T12:36:16.341Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>Day 18 — Docker for DevOps Engineers.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pVUKZKpM5vbI8D-9GLzKg.png" /></figure><h3>• Docker Compose :</h3><p><strong>D</strong>ocker Compose is a tool that was developed to help define and share multi-container applications. With Compose, we can create a YAML file to define the services and with a single command, can spin everything up or tear it all down.</p><p>The <em>big</em> advantage of using Compose is you can define your application stack in a file, keep it at the root of your project repo (it’s now version controlled), and easily enable someone else to contribute to your project. Someone would only need to clone your repo and start the compose app. In fact, you might see quite a few projects on GitHub/GitLab doing exactly this now. Docker Compose can also be used to scale a service, update images, and view the logs of the running containers.</p><p>Docker Compose simplifies the process of managing multi-container applications by allowing developers to define all of the services that make up an application in a single file, and then start and stop all of the services with a single command. It also allows for easy scaling and updating the services, and view logs.</p><h3>• What is YAML..?</h3><p><strong>YAML</strong> is a data serialization language. Back when it came out in 2001, YAML stood for “<em>Yet Another Markup Language</em>.” The acronym was later changed to “<em>YAML Ain’t Markup Language</em>” to emphasize that the language is intended for data and not documents.</p><p>It is not a programming language in the true sense of the word. YAML files store information, so they do not include actions and decisions.</p><p>Unlike XML or JSON, YAML presents data in a way that makes it easy for a human to read. The simple syntax does not impact the language’s capabilities. Any data or structure added to an XML or JSON file can also be stored in YAML.</p><p><strong><em>Besides human-readable code, YAML also features:</em></strong></p><ul><li>Cross-language data portability</li><li>A consistent data model</li><li>One-pass processing</li><li>Ease of implementation and use</li></ul><blockquote><strong><em>TASK-1 :</em></strong></blockquote><ul><li><strong>Learn how to use the docker-compose.yaml file, to set up the environment, configure the services and links between different containers, and also to use environment variables in the docker-compose.yaml file.</strong></li></ul><p><em>Step 1 :</em><strong><em> </em></strong><em>Update your package manager and install docker in your.</em></p><pre>sudo apt-get install docker</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*ZnU1D1zWfugEEvI1gkPDWw.png" /></figure><p><em>Step 2 : Install Docker-compose.</em></p><pre>sudo apt-get install docker-compose</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*st01nATflMugJyNy7qEZZQ.png" /></figure><p><em>Step 3 : Create a “docker-compose.yml” file inside project folder.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*AxkSKAIA1A4aCyXNRvYLdA.png" /></figure><p><em>Step 4 : Now to build and run your app with Compose use command.</em></p><pre>sudo apt-get install docker compose<br>sudo apt-get install docker compose up -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*st01nATflMugJyNy7qEZZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*k7nfq0gnGhU1Xh1xCdAxYQ.png" /></figure><p><em>Step 5 : Once containers as up we can check it’s details with “ sudo docker ps”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*uYxS0XqYjvnUFX3gf38qOg.png" /></figure><p><em>Step 6 : To check locally, Our Nginx-server container is running at port 808.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*VbOqzT8Pmpgf1mAhTUo0ug.png" /></figure><blockquote><strong><em>Task-2 :</em></strong></blockquote><ul><li><strong>Pull a pre-existing Docker image from a public repository (e.g. Docker Hub) and run it on your local machine. Run the container as a non-root user (Hint- Use usermod command to give user permission to docker). Make sure you reboot instance after giving permission to user.</strong></li></ul><p><em>To pull an existing Docker image from Docker Hub and run it on your local machine, you can use the “docker pull” command followed by the image name.</em></p><pre>sudo docker pull nginx:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*Pe7xpVAsaVHP0oCRmQUzAQ.png" /></figure><ul><li><strong>Inspect the container’s running processes and exposed ports using the docker inspect command.</strong></li></ul><p><em>To inspect the container’s running processes and exposed ports using the “docker inspect” command, you can use the following command:</em></p><pre>sudo docker inspect container_name<br>sudo docker inspect nginx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*5LyphtMkhf-Pzfz7qC4lpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dMAiKIJDhAhpCO7BCvAcqA.png" /></figure><ul><li><strong>Use the docker logs command to view the container’s log output.</strong></li></ul><p><em>To view the container’s log output, you can use the “docker logs” command followed by the container id.</em></p><pre>sudo docker logs container_id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*1QTmmFYJwov5RbGdj9RT5g.png" /></figure><ul><li><strong>Use the docker stop and docker start commands to stop and start the container. Then use the docker rm command to remove the container when you’re done.</strong></li></ul><p><em>To stop the container, you can use the “sudo docker stop container_id”</em></p><pre>sudo docker stop container_id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*NuDVTWFhUauyQYJYipf76g.png" /></figure><p><em>To remove the container when you’re done, you can use the “sudo docker rm” command followed by the container_id.</em></p><pre>sudo docker rm container_id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*h9WxrvIrfKyHGRtch139Tg.png" /></figure><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f85a20610b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 17 : Docker Project for DevOps Engineers.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-17-docker-project-for-devops-engineers-691099bfcb9e?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/691099bfcb9e</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Fri, 27 Jan 2023 10:46:17 GMT</pubDate>
            <atom:updated>2023-01-27T10:46:17.800Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3><strong>Day 17 : Docker Project for DevOps Engineers.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OTLU6kstNgX7o_yR7HQVdA.png" /></figure><h3>• Dockerfile :</h3><p><strong>D</strong>ockerfile is a simple text file that consists a set of instructions to build Docker images. A Dockerfile that contains commands that are used to assemble an image. We can use any command that call on the command line. Docker builds images automatically by reading the instructions from the Dockerfile. The docker build command is used to build an image from the Dockerfile. Docker runs instructions of Dockerfile in top to bottom order. The first instruction must be <strong>FROM</strong> in order to specify the Base Image.</p><p>· Here, we are listing some commonly used instructions.</p><p>⁃ <strong>FROM : </strong>This instruction is used to set the Base Image for the subsequent instructions. A valid Dockerfile must have FROM as its first instruction.</p><p>Ex. <strong>FROM</strong> ubuntu</p><p>⁃ <strong>LABEL :</strong> We can add labels to an image to organize images of our project. We need to use LABEL instruction to set label for the image.</p><p>Ex.<strong> LABEL</strong> vendorl = “JavaTpoint”</p><p>⁃ <strong>RUN : </strong>This instruction is used to execute any command of the current image.</p><p>Ex. <strong>RUN</strong> /bin/bash -c ‘source $HOME/.bashrc; echo $HOME’</p><p>⁃ <strong>CMD : </strong>This is used to execute application by the image. We should use CMD always in the following form</p><p>1. <strong>CMD</strong> [“executable”, “param1”, “param2”?]</p><p>This is preferred way to use CMD. There can be only one CMD in a Dockerfile. If we use more than one CMD, only last one will execute.</p><p>⁃ <strong>COPY : </strong>This instruction is used to copy new files or directories from source to the filesystem of the container at the destination.</p><p>Ex. <strong>COPY</strong> abc/ /xyz</p><p>⁃ <strong>WORKDIR : </strong>The WORKDIR is used to set the working directory for any RUN, CMD and COPY instruction that follows it in the Dockerfile. If work directory does not exist, it will be created by default.</p><ol><li><strong>WORKDIR</strong> /var/www/html</li></ol><blockquote><strong><em>Tasks :</em></strong></blockquote><p><strong>1)Create a Dockerfile for a simple web application (e.g. a Node.js or Python app)</strong></p><p><em>a) First we build a simple web application on python as “</em><strong><em>app-master</em></strong><em>” &amp; then use it to create a docker file.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*9yNvKsGgqGi9ncaXGhxFbQ.png" /></figure><p><em>b) To create a Dockerfile for python app, create a file named “</em><strong><em>Dockerfile</em></strong><em>”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*xdQ52g3KqoMSkkDCAeQRbA.png" /></figure><p><em>c) Here to view the </em><strong><em>Dockerfile</em></strong><em> &amp; add a </em><strong><em>Script</em></strong><em> to it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*dAfaWFf7tkaeNpJzhQKwOQ.png" /></figure><p><strong>2) Build the image using the Dockerfile and run the container.</strong></p><p><em>a) Build the dockerfile using command “</em><strong><em>sudo</em></strong><em> </em><strong><em>docker build . -t app-master</em></strong><em>”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*AphbEvwc6yqg6xxsZ9I4wA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*riydN6PGchgfsXgh-ZZSkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Z3YfckErteHnsJsN7Aq2fA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*UKmgGkfTdMp8g2zdOfR0Yw.png" /></figure><p><strong>3) Verify that the application is working as expected by accessing it in a web browser</strong></p><p><em>To verify that the application is working, you can access it in a web browser by going to “</em><a href="http://localhost:3000/"><strong><em>http://localhost:8000</em></strong></a><em>&quot;.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*yNSVwebdAJqY1VHX0zQz7w.png" /></figure><p><strong>4) Push the image to a public or private repository (e.g. Docker Hub)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*pENnY3-IaLqHZ_j27AVJGw.png" /></figure><p><em>Use command “docker login” to login to dockerhub. Then use the command “sudo </em><strong><em>docker tag &lt;image_name&gt;:tag username/image_name</em></strong><em>”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*T-FTgeQzccErOyV-BdAX5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*w6OiVxMHC1jzEPCJezEHgQ.png" /></figure><p><em>At last, perform the command “</em><strong><em>sudo</em></strong><em> </em><strong><em>docker push docker_hub_user-id/&lt;image_name</em></strong><em>”&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*nYnz1BYjo1ZyVZYjv32NGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*mJ6gnAMbLkB7KDywUAxa4A.png" /></figure><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=691099bfcb9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 16 : Docker for DevOps Engineers.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-16-docker-for-devops-engineers-7f18025212a9?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f18025212a9</guid>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 17:11:44 GMT</pubDate>
            <atom:updated>2023-02-03T18:38:48.331Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>Day 16 : Docker for DevOps Engineers.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GWXX5uIKPPrShTMkYK_zvg.png" /></figure><h3>Docker:</h3><p>Docker is similar in concept to Virtual Machines, except it’s much more lightweight. Instead of running an entire separate operating system, Docker runs containers, which use the same host operating system, and only virtualize at a software level. Docker Engine runs on Linux, Windows, and macOS, and supports Linux and Windows for Docker containers. The exact flavor of Linux doesn’t actually matter; most versions of Linux will run the same kernel, and only differ in the user software. Docker can install this user software to the container, allowing you to run a CentOS container on Ubuntu. You couldn’t though, for example, run FreeBSD on Ubuntu, since the kernels are different.</p><p>The Docker container image includes only what your app needs to run. If your app makes use of nginx and Node.js, the container image will include them, but you won’t be burdened with all the other userland apps you’d generally find on Linux.</p><ul><li><strong>Commands to setup docker :</strong></li></ul><pre>* sudo yum update -y<br><br>* sudo amazon-linux-extras install docker<br><br>* sudo service docker start<br><br>* sudo systemctl enable docker<br><br>* sudo usermod -a -G docker ec2-user</pre><blockquote><strong><em>Tasks :</em></strong></blockquote><ul><li><strong>Use the docker run command to start a new container and interact with it through the command line. [Hint: docker run hello-world]</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*OhBcaxg13tPqNKY_.png" /></figure><ul><li><strong>Use the docker inspect command to view detailed information about a container or image.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*XlTYpeqWFYbKAVKS.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Pv1ofyysB8EzLlhW.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*bt8du2Lj14tew_9r.png" /></figure><ul><li><strong>Use the docker port command to list the port mappings for a container.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*emV8jDZ8blyBzmsf.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*taRfIVIFK2r72VjM.png" /></figure><ul><li><strong>Use the docker stats command to view resource usage statistics for one or more containers.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*gL3Cd90UJ3TjFWQ9.png" /></figure><ul><li><strong>Use the docker top command to view the processes running inside a container.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Yr6y_49_E_FNmS7V.png" /></figure><ul><li><strong>Use the docker save command to save an image to a tar archive.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*FoboY6gX2VoY9lSD.png" /></figure><ul><li><strong>Use the docker load command to load an image from a tar archive.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*gbESQPdsiNuvSHiD.png" /></figure><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f18025212a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 15 Task: Python Libraries for DevOps.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-15-task-python-libraries-for-devops-9fc563f2a380?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fc563f2a380</guid>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Sun, 22 Jan 2023 16:57:26 GMT</pubDate>
            <atom:updated>2023-02-03T18:43:06.046Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>Day 15 : Python Libraries for DevOps.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*z07H21X5S7YKB-rreLsYvA.png" /></figure><h3>• Reading JSON and YAML in Python :</h3><ul><li>As a DevOps Engineer you should be able to parse files, be it txt, json, yaml, etc.</li><li>You should know what all libraries one should use in Pythonfor DevOps.</li><li>Python has numerous libraries like os, sys, json, yaml etc that a DevOps Engineer uses in day to day tasks.</li></ul><p>⁃ <strong>JSON</strong> is a standard format for data exchange, which is often used for exchanging data between a server and a web application. In Python, the json module provides functions for working with JSON in Python. This module provides two methods for encoding Python objects into JSON format, json.dump() and json.dumps(), and two methods for decoding JSON, json.load() and json.loads()</p><p>⁃ <strong>YAML,</strong> on the other hand, is a human-readable data serialization format. It is often used for configuration files and data exchange between languages that have different data structures. YAML is a superset of JSON and can be used to represent complex data structures such as lists and dictionaries. It is also less verbose than JSON, making it easier to read and write.</p><blockquote><strong><em>Task 1 :</em></strong></blockquote><h4><strong>a) Create a Dictionary in Python and write it to a json File.</strong></h4><ul><li>To create a dictionary in Python and write it to a json file, you can use the json module:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*ZTKytZMibBLJdCKL.png" /></figure><blockquote><strong><em>Task 2 :</em></strong></blockquote><p><strong>b) Read a json file services.json kept in this folder and print the service names of every cloud service provider.</strong></p><ul><li>To create a dictionary in Python and write it to a JSON file, you can use the json library. Here is an example:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*SiB7dZ2yliNd8LQL.png" /></figure><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fc563f2a380" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 14: Python Data Types and Data Structures.]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-14-python-data-types-and-data-structures-9da3297a56c9?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9da3297a56c9</guid>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Sat, 21 Jan 2023 15:11:45 GMT</pubDate>
            <atom:updated>2023-02-03T18:44:51.755Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>• Data Types :</h3><p>Data types are the classification or categorization of data items. It represents the kind of value that tells what operations can be performed on a particular data. Since everything is an object in Python programming, Python Data Types are used to define the type of a variable. Data types are the classification or categorization of data items. It represents the kind of value that tells what operations can be performed on a particular data. Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes.</p><p>For example, a person’s name is stored as a alpha characters and his age is stored as numeric value and address is stored as alphanumeric characters.</p><p>Following are the standard or built-in data type of Python:</p><ul><li>Numbers</li><li>Strings</li><li>Tuples</li><li>Lists</li><li>Dictionary</li><li>Sets</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*xv-FliM-1X-woYV3NADbBg.png" /></figure><h3>• Data Structures :</h3><p>A data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently. A data structure is not only used for organizing the data. It is also used for processing, retrieving, and storing data. There are different basic and advanced types of data structures that are used in almost every program or software system that has been developed. So we must have good knowledge about data structures.</p><p>•<strong> Lists:</strong> Lists are a collection of items in a specific order. They are defined using square brackets, and items can be accessed by their index number. Lists are mutable, meaning the contents can be changed.</p><p>• <strong>Tuples:</strong> Tuples are similar to lists, but they are immutable, meaning the contents cannot be changed. They are defined using parentheses and can be accessed by their index number.</p><p>• <strong>Dictionaries:</strong> Dictionaries are a collection of key-value pairs. They are defined using curly braces and items can be accessed by their key. Dictionaries are mutable.</p><p>• <strong>Sets:</strong> Sets are a collection of unique items. They are defined using curly braces and items cannot be accessed by their index number. Sets are mutable.</p><p>•<strong> Strings:</strong> Strings are a collection of characters. They are defined using single or double quotes and can be accessed by their index number. Strings are immutable.</p><blockquote><strong><em>Task- 1 :</em></strong></blockquote><p><strong>Give the Difference between List, Tuple and set. Do Handson and put screenshots as per your understanding.</strong></p><ul><li><strong>List:</strong> List are just like the arrays, declared in other languages which is a ordered collection of data. It is very flexible as the items in a list do not need to be of the same type.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/0*cMH88D2F4LUakE5e.png" /></figure><ul><li><strong>Tuple:</strong> Tuple is also an ordered collection of Python objects. The only difference between tuple and list is that tuples are immutable i.e. tuples cannot be modified after it is created. It is represented by tuple class.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Yx1RlnGD34aVvbAa.png" /></figure><ul><li><strong>Set: </strong>Set<strong> </strong>is an unordered collection of data type that is iterable, mutable and has no duplicate elements. The order of elements in a set is undefined though it may consist of various elements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/0*ro_zKCtv2iivVxnz.png" /></figure><blockquote><strong><em>Task -2 :</em></strong></blockquote><p><strong>Create below Dictionary and use Dictionary methods to print your favourite tool just by using the keys of the Dictionary.</strong></p><pre>fav_tools =<br>{<br>1:&quot;Linux&quot;,<br>2:&quot;Git&quot;,<br>3:&quot;Docker&quot;,<br>4:&quot;Kubernetes&quot;,<br>5:&quot;Terraform&quot;,<br>6:&quot;Ansible&quot;,<br>7:&quot;Chef&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/0*FmdU53zTDF9pjScL.png" /></figure><blockquote><strong><em>Task -3 :</em></strong></blockquote><p><strong>Create a List of cloud service providers. Cloud_providers = [“AWS”,”GCP”,”Azure”]. Write a program to add Digital Ocean to the list of cloud_providers and sort the list in alphabetical order.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*hAwWhwlA_FxtNMjS.png" /></figure><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9da3297a56c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 13 Task : Python & Installation of Python]]></title>
            <link>https://medium.com/@abhayvishwakarma800/day-13-task-python-installation-of-python-a24035f5f6a6?source=rss-731ce944b57f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a24035f5f6a6</guid>
            <dc:creator><![CDATA[Abhay Vishwakarma]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 13:01:14 GMT</pubDate>
            <atom:updated>2023-02-03T18:46:26.606Z</atom:updated>
            <content:encoded><![CDATA[<h4>#90DAYSOFDEVOPSCHALLENGE</h4><h3>Day 13 Task : Python &amp; Installation of Python</h3><h3>• Python :</h3><p>Python is a high-level, general-purpose and a very popular programming language. Python programming language (latest Python 3) is being used in web development, Machine Learning applications, along with all cutting edge technology in Software Industry. Python Programming Language is very well suited for Beginners, also for experienced programmers with other programming languages like C++ and Java.</p><p>Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python’s support of modules and packages facilitates modular programs and reuse of code.</p><ul><li><strong><em>Some facts about Python Programming Language:</em></strong></li></ul><ol><li>Python is currently the most widely used multi-purpose, high-level programming language.</li><li>Python allows programming in Object-Oriented and Procedural paradigms.</li><li>Python programs generally are smaller than other programming languages like Java. Programmers have to type relatively less and indentation requirement of the language, makes them readable all the time.</li><li>Python language is being used by almost all tech-giant companies like — Google, Amazon, Facebook, Instagram, Dropbox, Uber… etc.</li><li>The biggest strength of Python is huge collection of standard library which can be used for the following:</li></ol><ul><li><a href="https://www.geeksforgeeks.org/machine-learning/"><strong><em>Machine Learning</em></strong></a></li></ul><p>a. GUI Applications (like <a href="https://www.geeksforgeeks.org/kivy-tutorial/">Kivy</a>, Tkinter, PyQt etc. )</p><p>b. Web frameworks like <a href="https://www.geeksforgeeks.org/django-tutorial/">Django</a> (used by YouTube, Instagram, Dropbox)</p><p>c. Image processing (like <a href="https://www.geeksforgeeks.org/opencv-python-tutorial/">OpenCV</a>, Pillow).</p><h3>• Installation of Python :</h3><blockquote><strong><em>Task :</em></strong></blockquote><ul><li><strong>Step 1: </strong>Open this website:<strong><em> </em></strong><a href="https://python.org/"><strong><em>https://python.org/</em></strong></a><strong><em>.</em></strong> This is the official website to download python in windows 11 or any other operating system</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*QmFCuxHAgkMIWmivKd4-5A.png" /></figure><ul><li><strong>Step 2:</strong> The website will automatically detect your operating system. During the writing of this blog, the latest version is 3.10.8.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ZP_M66aHgqiBIXHNXJ6B2w.png" /></figure><ul><li><strong>Step 3:</strong> Installing Python. After you click the downloaded file, the installation will start. First, tick the Add python.exe to PATH option. This will add python.exe file in an environment variable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*DtynXjGD6oLiz8gxCmKdug.png" /></figure><p><strong>Step 4:</strong> Python installation and setup are completed. Now, the following screen should be displayed. Click on Close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*rm-Ob5hukP-vucU-tmJuKw.png" /></figure><p><strong>Step 5:</strong> Open Command prompt from search bar in your laptop to chcek the Python version with command : <strong>python — version</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*Knw9oOD-E5hjVX10fWV66g.png" /></figure><p><strong>Step 6:</strong> Try running simple script on python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*WeIqTroNcwGbgryrkGUh0w.png" /></figure><p>Successfully downloaded Python 3.8.10 on Windows 11 successfully.</p><p><em>Thank you for reading this blog. I hope you find this really interesting.</em></p><p><em>If you like it then press ‘</em><strong><em>Clap</em></strong><em>’ button and Follow me on </em><a href="http://www.linkedin.com/in/abhay-vishwakarma800/"><strong><em>Linkedin</em></strong></a><em> &amp; </em><a href="https://github.com/Abhi0230"><strong><em>Github</em></strong></a><em> platform.</em></p><blockquote><strong><em>— Abhay Vishwakarma</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a24035f5f6a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>