Docker Access Issues in China

Docker Access Issues in China

As of November 2024, the official Docker registry (hub.docker.com) remains blocked in mainland China, as observed in nationwide access tests on November 12, 2024. This situation has created significant challenges for developers and operations teams.

Nationwide access test to the “hub.docker.com”, November, 2024

Solution: Configuring Docker Proxy

This guide will teach you how to configure Docker proxy access.

Prerequisites

  • Proxy software such as ss-local / Clash
  • Proxychains
How to use and setup proxychains - a minimalist guide
💡This article aims at solving network issues you will encounter while being a software developer or tech-related personal in mainland China. When executing some command in Linux operating system, they will curl something or git clone somewhere that is blocked by the GFW time to time. This is a common

Proxychains Installation guide

Installing Docker

proxychains curl -fsSL https://get.docker.com -o get-docker.sh

Download the Docker installation script

vi get-docker.sh

Edit the installation script

Add 'proxychains' before the sh -c command (around line 386)
proxychains sudo sh get-docker.sh

Run the installation script

sudo usermod -aG docker $USER
sudo systemctl enable docker #Optional: If you want the Docker daemon to start when the system starts, use the following.
sudo systemctl start docker

Post-installation steps

Installing Docker Compose

Visit the official Docker documentation (https://docs.docker.com/compose/install/linux/#install-using-the-repository) and check the "Install the plugin manually" section.

Installing Docker Compose

Add proxychains before the curl command in the installation instructions to complete the Docker and Docker Compose installation.

This should complete your setup of Docker and Docker Compose with proxy access in China.

Yikai Wang

Yikai Wang

Shanghai, China