Docker is an open-source initiative/project/platform that automates the deployment of software into portable, autonomous containers capable of operating locally or in the cloud. Docker enables the separation of applications from infrastructure, facilitating rapid software delivery and allowing for infrastructure management in a manner analogous to application management.
Docker facilitates developers, system administrators, and others in encapsulating their applications within a sandbox, referred to as a "container," enabling them to operate on the host operating system.
Dockers lets users package an app with all of its dependencies into a standard unit for software development.
Advantage of Docker
- Docker lets you make environments that are small, independent, and always work the same on any machine. This cuts down on the time it takes from writing code to putting it into production.
- Docker greatly shorten the time between writing code and running it in production by reducing it. Docker allows for automating the deployment of applications into portable, self-sufficient containers that can run on the cloud or on-premises.
Prerequisites:
64-bit version of Windows 7 or higher
Get the Linux kernel update package and install it.
Docker – Installation on Windows
If you're not using Windows 10 Pro, you will need to install our Docker tools on Windows. Docker will be running in a virtual machine, and we will use a Docker client to talk to that virtual machine.
Install Docker Desktop on your Windows computer.
- Visit this website (https://docs.docker.com/desktop/setup/install/windows-install/) and click on the “Docker Desktop for Windows x86-64” button.
- Right click on downloaded Msr, Click on Run as administrator
- in Install window select options
- Use WSL2, instead of Hyper V
- Uncheck All Window Containers to be used with these installation.
- click Ok
- Then we need to restart our system, so in the Docker installer box, click the "Close and restart" button.
- The Docker windows/double click the docker icon on desktop will show up after you restart the computer.
- Assign your email for docker account - connect with docker hub online
Installation location
- Check installation location or change location
- Default location is - C:\Users\Win10\AppData\Local\Docker\wsl
- Run Docker Desktop, Settings from Header, Click Resources Tab >> Change Path for WSL as Required.
- Let change this to D:\Docker-
- this create a new folder DockerDesktopWSL inside D:\Docker
- Even though we have installed Docker in Different Drive Below ***
BUT THE WSL, IMAGE ETC STILL WILL BE IN %HOME%\AppData\Local\Docker
Verify Docker desktop installation using command -
docker version