YouTip LogoYouTip

Windows Docker Install

Docker is not a universal container tool; it relies on an existing and running Linux kernel environment. Docker essentially creates an isolated file environment under a running Linux system, so its execution efficiency is almost equivalent to the deployed Linux host. Therefore, Docker must be deployed on a system with a Linux kernel. If other systems want to deploy Docker, they must install a virtual Linux environment. !(#) The method for deploying Docker on Windows is to first install a virtual machine and then run Docker within the virtual machine that has a Linux system installed. ## Win10 System Docker Desktop is the official installation method for Docker on Windows 10 and macOS operating systems. This method still involves installing Linux in a virtual machine first and then installing Docker. Docker Desktop official download address: [https://docs.docker.com/desktop/install/windows-install/](https://docs.docker.com/desktop/install/windows-install/) **Note:** This method only applies to Windows 10 Professional, Enterprise, Education editions, and some Home editions! ### Installing Hyper-V Hyper-V is a virtual machine developed by Microsoft, similar to VMWare or VirtualBox, and is only available for Windows 10. This is the virtual machine used by Docker Desktop for Windows. However, once this virtual machine is enabled, QEMU, VirtualBox, or VMWare Workstation 15 and earlier versions will not be usable! If you must use other virtual machines on your computer (for example, the emulator required for developing Android apps), please do not use Hyper-V! ### Enabling Hyper-V !(#) Programs and Features !(#) Turn Windows features on or off !(#) Select Hyper-V !(#) You can also enable Hyper-V via command line. Please right-click the Start menu and run PowerShell as an administrator, then execute the following command: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All ### Installing Docker Desktop for Windows Click (https://hub.docker.com/?overlay=onboarding) and download the Windows version. If you are not logged in, you will be prompted to register and log in: !(#) ### Running the Installer Double-click the downloaded Docker for Windows Installer file, click Next through the steps, and click Finish to complete the installation. !(#) !(#) After installation, Docker will start automatically. A small whale icon will appear in the notification area !(#), indicating that Docker is running. Three icons will also appear on the desktop, as shown below: We can execute `docker version` in the command line to check the version number, and `docker run hello-world` to load a test image for testing. If it hasn't started, you can search for Docker in Windows to start it: !(#) After starting, you can also see the small whale icon in the notification area: !(#) > If you encounter an error caused by WSL 2 during startup, please install (https://docs.microsoft.com/zh-cn/windows/wsl/install-win10). After installation, you can open PowerShell and run the following command to check if it is running successfully: docker run hello-world After successful execution, the following information should appear: !(#) * * * ## win7, win8 Systems win7, win8, etc., need to use docker toolbox for installation. In China, you can use Alibaba Cloud's mirror for download. Download address: [http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/](http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/) The installation is relatively simple. Double-click to run, click Next, and you can select the components you need: !(#) docker toolbox is a toolset that mainly includes the following: * Docker CLI - The client used to run the Docker engine to create images and containers. * Docker Machine - Allows you to run Docker engine commands in the Windows command line. * Docker Compose - Used to run docker-compose commands. * Kitematic - This is the GUI version of Docker. * Docker QuickStart shell - This is a command-line environment already configured with Docker. * Oracle VM Virtualbox - Virtual machine. After the download is complete, click to install. After successful installation, three icons will appear on the desktop, as shown below: !(#) Click the Docker QuickStart icon to start the Docker Toolbox terminal. If the system displays a User Account Control window to run VirtualBox to modify your computer, select Yes. !(#) You can enter the following commands at the $ symbol to execute. $ docker run hello-world Unable to find image 'hello-world:latest' locally Pulling repository hello-world 91c95931e552: Download complete a8219747be10: Download complete Status: Downloaded newer image for hello-world:latest Hello from Docker. This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker Engine CLI client contacted the Docker Engine daemon. 2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub. (Assuming it was not already locally available.) 3. The Docker Engine daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash For more examples and ideas, visit: https://docs.docker.com/userguide/
← Number XxxvalueUbuntu Docker Install β†’