EMC Testnet Documentation: Quick Start Guide
  • EMC TESTNET
    • EMC Testnet Chain Documentation: Quick Start Guide
      • Introduction
      • Requirements
      • Setting Up the Development Environment
      • Testing
      • Conclusion
    • Estimate Gas Costs
      • What is Gas fee?
      • Methods to estimate gas costs
      • Precaution
      • Conclusion
    • EMC chain documents: Mainnet and Testnet
      • EMC mainnet
      • EMC Testnet
      • User Guide
      • Conclusion
    • Cross-chain messaging
      • What is cross-chain messaging?
      • Principle of cross-chain message passing
      • Implement cross-chain messaging
      • Conclusion
    • How to use oracles in applications
      • What is an oracle?
      • Steps to use oracle
      • Precautions
      • Conclusion
    • Precompilation
      • Overview of precompiled contracts
    • Functions of NodeInterface
      • Using NodeInterface
      • Conclusion
    • RPC endpoints and providers
      • Introduction
      • EMC Mainnet RPC endpoint
      • EMC Testnet RPC endpoint
      • User Guide
      • Conclusion
    • Block explorer
      • User Guide
    • Cross-chain bridge
      • Overview
      • Detailed operation rules and principles
  • EMC Airdrop Guidelines
    • EMC Airdrop Guidelines
      • What is EMC Public Testnet?
      • EMC Public Testnet Incentive Program
      • EMC Public Testnet Mining Rules
      • How to seek help if you encounter a problem?
      • How long will the EMC Public Testnet Mining Event last?
    • Wallet Setup
      • Method 1: One-Click Configuration (Recommended)
      • Method 2: Manual Configuration
        • EMC Testnet Network RPC Information
    • Faucets: Claim Test Tokens
    • Testnet Tutorial Guide
      • Windows Tutorial
        • Docker Installation and Setup Tutorial(Window Version)
      • MacOS Tutorial
      • Linux Tutorial
        • Docker Installation and NVIDIA GPU Configuration
        • EMC Client Installation and Operation
      • Windows CLI Tutorial
        • WSL Subsystem Installation
        • Install and Setup Docker Desktop
        • EMC CLI Download and Mining
        • Claim Gas Fee from EMC Community
    • EMC Testnet Blockchain Explorer
Powered by GitBook
On this page
  • 1. Docker Desktop Settings
  • 2. Docker Desktop Settings
  • 2.1 Precondition
  • 2.2 Update systemd environment configuration
  • 2.3 Verify if the proxy is successfully set up
  1. EMC Airdrop Guidelines
  2. Testnet Tutorial Guide
  3. Windows CLI Tutorial

Install and Setup Docker Desktop

PreviousWSL Subsystem InstallationNextEMC CLI Download and Mining

Last updated 7 months ago

If Docker Desktop is not installed, refer to for setup instructions.

1. Docker Desktop Settings

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.

2. Docker Desktop Settings

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.

2.1 Precondition

You need a static IP address or server address that can access the extranet.

2.2 Update systemd environment configuration

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.

1st Method: Update the http-proxy.conf of systemd

Create the directory using the following command; the configurations in this directory override the default settings of dockerd.

sudo mkdir -p /etc/systemd/system/docker.service.d

Create a new configuration file http-proxy.conf

sudo vi /etc/systemd/system/docker.service.d/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:

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80" # your IP (external or server): Port
Environment="HTTPS_PROXY=https://proxy.example.com:443"  # your IP (external or server): Port
Environment="NO_PROXY=your-registry.com,127.0.0.1,*.example.com"

Multiple NO_PROXY variable values are separated by commas and can include wildcards (*).

Reload the configuration file and restart dockerd.

sudo systemctl daemon-reload
sudo systemctl restart docker

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:

sudo systemctl show --property=Environment docker

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:

sudo find / -name docker.service

Next, use the command to modify the docker.service file:

sudo vi /usr/lib/systemd/system/docker.service

Add the following environment variables to the opened file:

Environment="HTTP_PROXY=http://proxy.example.com:80" #Your IP (external or server): Port
Environment="HTTPS_PROXY=https://proxy.example.com:443" #Your IP (external or server): Port
Environment="NO_PROXY=your-registry.com,127.0.0.1,*.example.com"

Press ESC and enter :wq to save the file content. Use the following command to load and restart:

sudo systemctl daemon-reload
sudo systemctl restart docker

2.3 Verify if the proxy is successfully set up

As shown in the image, this indicates that you can pull external images through the proxy

Docker Installation and Setup Tutorial (Windows version)