Install and Setup Docker Desktop
Last updated
Last updated
If Docker Desktop is not installed, refer to for setup instructions.
1.1 Start Docker Desktop Service
In Windows Powershell (run as Administrator), enter net start com.docker.service
to start the Docker Desktop Service.
2.2 Start docker daemon
In Windows Powershell (run as Administrator), enter cd "C:\Program Files\Docker\Docker"
to navigate to the Docker Desktop installation path. Run the command .\DockerCli.exe -SwitchDaemon
to start the Docker daemon.
2.3 Launch Docker Desktop
Right-click on Dockers Desktop to run as administrator.If an error occurs, follow the prompts. In Windows Powershell (run as Administrator), enter Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All
.Enter Y
to confirm and restart the computer to apply the changes. After the restart, run Docker Desktop again as Administrator.
As shown in the image, the "Engine running" status indicates that Docker starts normally.
2.4 Launch Docker Desktop
As shown in the image, set up WSL integration with the installed Ubuntu subsystem. Click "Apply & Restart" to implement the changes.
2.5 Edit daemon.json to change the image source
To avoid the "Failed to pull image" error, modify the Docker images in daemon.json
.Please add the image repository source available for Docker that you are familiar with.
As shown in the image, add the ACR image acceleration address to the daemon.json
file. Apply the changes and restart to enable them.
In some cases, Docker may not access the image links replaced in daemon.json
when pulling images. You can resolve issues with pulling images by setting up a Docker proxy.
You need a static IP address or server address that can access the extranet.
The pulling and management of images are handled by the Docker daemon, so it needs to be aware of the proxy server's existence. Since the Docker daemon is managed by systemd, we need to configure systemd.
Create the directory using the following command; the configurations in this directory override the default settings of dockerd
.
Create a new configuration file http-proxy.conf
Configure environment variables in the file. If you have created a private image repository and need dockerd
to bypass the proxy server for direct connections, set the NO_PROXY
variable:
Multiple NO_PROXY
variable values are separated by commas and can include wildcards (*).
Reload the configuration file and restart dockerd.
Note: If you encounter the error "Failed to restart docker.service: Unit docker.service not found" when restarting Docker, you can use the apt
command to install Docker for repair.
Check to confirm that the environment variables are correctly configured:
2nd Method: Update the docker.service
in systemd.
The location of the docker.service
configuration file may vary depending on the operating system. Use the following command to find the file directory:
Next, use the command to modify the docker.service
file:
Add the following environment variables to the opened file:
Press ESC
and enter :wq
to save the file content. Use the following command to load and restart:
As shown in the image, this indicates that you can pull external images through the proxy