Since the emergence of DevOps, there had been a lot of buzz around it as DevOps is a combination of tools, framework, and automation. DevOps aimed to align the Dev and Ops team with shared goals. DevOps practices are applied to other teams as well. For more information about the DevOps training and certification, refer DevOps tools courses
DevOps is a mindset, not a toolset. But nothing could workout in an IT team without proper tools. DevOps teams use tools to accelerate and automate the process, thereby ensuring continuous integration, continuous delivery and automation.
The need for DevOps can be understood by the following example. A developer builds an application and sends it to the tester. But, the environments of development and testing systems are different; thus, the code does not work. There are two solutions to this: Docker and Virtual Machines, but Docker is far better in terms of performance, scaling, and efficiency.
DevOps teams could also get benefit from emerging technologies like AI/ML. The AI/ML teams can create patterns for DevOps teams so that the DevOps team can leverage the opportunity to find coding problems that cause bugs so that the DevOps teams can dig deeper into it.
CI/CD is an essential part of DevOps, it maximizes the development phase thereby reducing the time and effort in integrating, testing and deploying the components. The CI/CD practice shifts the focus of the team on to development thereby increasing the organization productivity, efficiency, testing and collaboration.
What is DevSecOps?
In some of the DevOps models, security teams get aligned with development and operations and throughout the application lifecycle to ensure that the development meets all the compliance requirements from the beginning of the application itself. When there is a focus on security in the DevOps team, then it is referred to as DevSecOps.
DevSecOps can be applied to any environment such as cloud native, on premises, hybrid etc.
Docker - An Overview
Docker is a platform that enables creating, deploying, and running applications with the help of containers. A container is a unit of software that packages the code and all its dependencies together such that the application becomes runnable irrespective of the environment.
Container isolates their application and its dependencies into a self-contained unit that can run anywhere. Container removes the need for physical hardware allowing for more efficient use of computing resources. They provide operating-system-level virtualization. Moreover, developers can collaborate faster without worrying about which software dependency they need to install.
A container is a runnable instance of an image. An image is a read-only template with instructions for creating a Docker container. To get more knowledge on docker refer to Kubernetes and docker certification.
Docker is an open source software platform to create, deploy and manage virtualized application containers on a common operating system. Docker packages, provisions and runs containers. Docker packages the application with its all necessary configuration files, dependencies .Each container shares the common underlying Operating system. Software Developers can create containers without docker, but docker makes it more easier to build, safer and simpler to build and deploy containers.
- Docker Engine: It handles the underlying tasks and applications involved in building container-based applications
- Docker Hub: It is SAAS tool that enables users to publish and share their applications through a common library.
- Docker CLI: It is a command line interface tool which is used to run docker commands
- Docker File: It is a simple text file which containers instructions for how to build a container
- Docker Daemon: It is a service which runs in the operating system.
- Docker Registry: It enables you to track image versions in repositories, using tagging for identification
- Docker Containers: It is live, runnable instances of docker images.
- Docker Image: Docker image is bundle of application source code along with all its dependencies, tools and libraries.
Why to Use Docker?
- Improved and seamless portability
- Light weight applications
- Automated container creation
- Container Reuse
- Container Versioning
- Shared Container Libraries
It consists of a Docker Engine which is a client-server application with three major components:
- A server is a type of long-running program called a daemon process (the docker command).
- A REST API specifies interfaces that programs can use to talk to the daemon and instruct it on what to do.
- A command-line interface (CLI) client is used to run docker commands.The docker commands are used to start,stop and configure docker
How to Install Docker on Windows?
- Double-click Docker Desktop Installer.exe to run the installer.
- If you haven’t already downloaded the installer (Docker Desktop Installer.exe), you can get it from Docker Hub.
- Once the application is installed, follow the instructions from the installation wizard and proceed with the installation
- Confirm the installation process, Close the wizard once the installation is successful.
Install from Command Line
1. After downloading Docker Desktop Installer.exe, run the following command in a terminal to install Docker Desktop
"Docker Desktop Installer.exe" install
2. If you’re using PowerShell you should run it as
Start-Process '.\win\build\Docker Desktop Installer.exe' -Wait install
3. If using the Windows Command Prompt
start /w "" "Docker Desktop Installer.exe" install
4. Docker desktop doesn't start automatically after installation. Search for Docker Desktop in windows and select
Before starting the application, Docker offers an onboarding tutorial. The tutorial explains how to build a Docker image and run a container.
- In order to proceed with the installation, Click the check box to accept the user terms and conditions
- Next, follow the instruction below to install the Docker engine on your system.
- Go to Docker CLI and run the Docker version to verify the version of Docker installation on the system.
Here is a list of elements you should have in order to create and run Docker containers:
- Docker Engine: It runs on the host machine to build and run containers
- Docker Daemon: It manages Docker containers
- Docker Client: It runs commands. The command is translated using REST API and delivered to the Docker Daemon
- Docker Compose: It runs two containers in a single service.
How to Start Docker Daemon on Windows?
To start docker in daemon mode, navigate to docker file location where the docker desktop app is installed and run the dockerd.exe
Sometimes there might be an issue with docker like docker daemon not starting, in order to resolve the issue, one can try the following resolution.
Resolution 1: Restart the docker service, Go to start→search→services.msc. From the services, screen click on Docker Desktop services→restart.
Resolution 2: Using DockerCli.exe, one can switch daemon configuration. One can use the below command to point the docker CLI to either linux or windows.
PS C:\Program Files\Docker\Docker> ./DockerCli.exe -SwitchDaemon
Resolution 3: Restart the docker services using GUI. From the docker GUI, Settings -> Reset – Restart Docker Desktop.
What is Docker wsl2?
By enabling the wsl2 engine for docker, it enables user to leverage Linux workspaces and users to avoid maintaining both Linux and window build scripts. This enables the docker windows container on Linux.
How to Switch Between Windows and Linux Containers?
From the Windows desktop menu, you can select which daemon the docker CLI talks to. One can select ‘Switch to window containers’ to use window containers and select ‘Switch to Linux containers’ to use Linux containers.
To uninstall Docker Desktop from your Windows machine
- Navigate to the Windows Start menu, select Settings > Apps > Apps & features.
- Select Docker Desktop from the Apps & features list
- Select and Click Uninstall
- Confirm once the tool gets uninstalled.
Installing the docker on windows can be done by following the above-mentioned steps. One can use docker CLI windows to start, stop and configure the containers. Above are mentioned steps to install docker on windows. For more information refer to docker classes.