# docker_install **Repository Path**: pingxiyan/docker_install ## Basic Information - **Project Name**: docker_install - **Description**: How to install docker in China and some common command about docker. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-08-24 - **Last Updated**: 2024-08-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # README #### Description How to install docker in China and some common command about docker. Refer [official docs](http://docs.docker.com/engine/install/ubuntu), if you can't access it, please refer [tsinghua mirror](https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/). # Installation(Based on Tsinghua mirror) #### Uninstall old version ``` for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done ``` #### Install for apt(online install) export DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/docker-ce" wget -O- https://get.docker.com/ | sh 'Note:' It doesn't work because we can't access https://get.docker.com/ in China. sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -i https://pypi.tuna.tsinghua.edu.cn/simple #### Install for deb(offline install) Download: [docs](https://docs.docker.com/engine/install/ubuntu/#install-from-a-package) Install: sudo dpkg -i containerd.io_1.7.20-1_amd64.deb docker-ce_27.1.2-1~ubuntu.20.04~focal_amd64.deb docker-ce-cli_27.1.2-1~ubuntu.20.04~focal_amd64.deb docker-buildx-plugin_0.16.2-1~ubuntu.20.04~focal_amd64.deb docker-compose-plugin_2.29.1-1~ubuntu.20.04~focal_amd64.deb Pull ubuntu:22.04 sudo docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/ubuntu:22.04 #### Common command sudo docker ps sudo docker images