Docker one-click install script

friendly reminder

Select the corresponding operating system, do not repeat the installation command

Linux

  • Support Debian / Ubuntu / RHEL / CentOS / Fedora etc.
  • Supports the above-mentioned Debian and Redhat-based distributions and some of their derivatives, and supports other distributions with the same underlying core
 bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/DockerInstallation.sh)
  • Docker CE : Docker Community Edition image repository for downloading and installing Docker-related packages. \
  • Docker Hub : Docker Hub image repository, the default is the official public repository, used to switch the source repository when downloading images, also known as image accelerator.

Note: The script integrates the installation of Docker Engine and Docker Compose . You can manually select the installation version and download source, and you can also manually select the image accelerator. It supports domestic and foreign server environments and ARM architecture processor environments.

Windows

Docker Desktop

macOS

Supports Apple M1 chip

 brew cask install docker

Can be installed via the brew package management tool, but Docker Desktop is still recommended

brew for apple m1 installation tutorial

Change software source

Script one-click replacement of Linux software sources

LinuxMirrors

  • GNU/Linux one-click replacement of domestic software source scripts
  • This project aims to provide convenience for friends engaged in computer-related industries
  • Theoretical support environment for all architectures, ARM environment has been tested
 bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh)
  • Completely copy the above command to the terminal and press Enter to execute it. If the curl package cannot be installed, copy the source code to the local and execute it manually.
  • In order to adapt to all environments, it is recommended to use the Root user to execute the script, and the switch command is sudo -i . If you encounter an error, please check the FAQ and help
  • If the environment you are using is not installed or does not support the simplified Chinese environment, please use the SSH客户端工具, otherwise the interactive content will not be correctly selected
  • During the execution of the script, the original source will be automatically backed up without manual backup. During this period, multiple subjective selection interactive contents will be output in the terminal, which can be quickly determined by pressing the Enter key.
  • Script support is used when the original source is misconfigured or does not exist, and can be reused; the software source changed by the script uses the HTTP protocol by default

Precautions

  • Debian-based Linux disables source code repositories and pre-release software sources by default. If you want to enable them, please uncomment the lines in the /etc/apt/sources.list file.
  • Some RedHat Linux repositories are not enabled by default . If you need to enable it, please change enabled=0 in the relevant repo file in the /etc/yum.repos.d directory to enabled=1

Adapted GNU/Linux distributions Linux Logo

Supported version
debian.svg Debian 8.0 ~ 11.3
ubuntu.svg Ubuntu 16.04 ~ 21.10
kali.svg Kali Linux 2.0 ~ 2022.1
redhat.svg Red Hat Enterprise Linux 7.0 ~ 8.5
centos.svg CentOS 7.0 ~ 8.5
fedora.ico Fedora 28 ~ 35

Currently only the above-mentioned Debian and RedHat-based distributions and some of their derivatives are supported

It also supports other distributions with the same underlying core in the above versions, such as Armbian Kubuntu Oracle Linux , etc.

The open source mirror site currently used by the script

mirror station name mirror station address IPv6 Kali Linux Fedora EPEL
1 Ali Cloud mirrors.aliyun.com
2 Tencent Cloud mirrors.cloud.tencent.com
3 HUAWEI CLOUD mirrors.huaweicloud.com
4 NetEase mirrors.163.com
5 sohu mirrors.sohu.com
6 Tsinghua University mirrors.tuna.tsinghua.edu.cn
7 Zhejiang University mirrors.zju.edu.cn
8 Nanjing University mirrors.nju.edu.cn
9 Chongqing University mirrors.cqu.edu.cn
10 Lanzhou University mirror.lzu.edu.cn
11 Shanghai Jiaotong University mirror.sjtu.edu.cn
12 Harbin Institute of Technology mirrors.hit.edu.cn
13 University of Science and Technology of China mirrors.ustc.edu.cn

The above are the open source mirror sites currently used by the script, all mirror sites support Debian Ubuntu CentOS software sources

If the script cannot output Chinese content normally during use, it can be used against this list in the same order as the script

Script execution flow

  • └ Select domestic source交互
    • └ Detect if it is a RHEL or CentOS system, choose whether to install/overwrite the EPEL extension domestic source交互
  • └ Select the WEB protocol交互used by the software source
  • └ Detect firewall and SELINUX if it is enabled and the system is RHEL or CentOS, choose whether to close the交互
  • └ Backup original source
    • └ Detect if there are duplicate backup files and select whether to overwrite the交互
  • └ Replace domestic source
  • └ Choose whether to update the package交互
    • └ Choose whether to clear downloaded package cache交互

FAQ & Help

  • If it prompts Command 'curl' not found , it means that the curl package is not currently installed

     sudo yum install -y curl || sudo apt-get install -y curl
  • If it prompts Command 'wget' not found , it means that the wget package is not currently installed

     sudo yum install -y wget || sudo apt-get install -y wget
  • If prompted bash: /proc/self/fd/11: No such file or directory , please switch to the Root user to execute


This article is reprinted from: https://blog.saky.site/post/docker-install/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment