Linux 一键安装 docker 脚本
# Source code is available at https://github.com/docker/docker-install/
#
# Usage
# ==============================================================================
#
# To install the latest stable versions of Docker CLI, Docker Engine, and their
# dependencies:
#
# 1. download the script
#
# $ curl -fsSL https://get.docker.com -o install-docker.sh
#
# 2. verify the script's content
#
# $ cat install-docker.sh
#
# 3. run the script with --dry-run to verify the steps it executes
#
# $ sh install-docker.sh --dry-run
#
# 4. run the script either as root, or using sudo to perform the installation.
#
# $ sudo sh install-docker.sh
#
# Command-line options
# ==============================================================================
#
# --version <VERSION>
# Use the --version option to install a specific version, for example:
#
# $ sudo sh install-docker.sh --version 23.0
#
# --channel <stable|test>
#
# Use the --channel option to install from an alternative installation channel.
# The following example installs the latest versions from the "test" channel,
# which includes pre-releases (alpha, beta, rc):
#
# $ sudo sh install-docker.sh --channel test
#
# Alternatively, use the script at https://test.docker.com, which uses the test
# channel as default.
#
# --mirror <Aliyun|AzureChinaCloud>
#
# Use the --mirror option to install from a mirror supported by this script.
# Available mirrors are "Aliyun" (https://mirrors.aliyun.com/docker-ce), and
# "AzureChinaCloud" (https://mirror.azure.cn/docker-ce), for example:
#
# $ sudo sh install-docker.sh --mirror AzureChinaCloud
#
# ==============================================================================
DOWNLOAD_URL=
https://docs.docker.com/desktop/setup/install/linux/debian/
https://desktop.docker.com/linux/main/amd64/docker-desktop-amd64.deb
https://c.kkgo.cc/desktop.docker.com/linux/main/amd64/docker-desktop-amd64.deb
https://docs.docker.com/engine/daemon/proxy/
Rootless
文档:https://docs.docker.com/engine/security/rootless/
守护进程
sudo loginctl enable-linger $(whoami)
使用 docker info
查看设置
Docker Playround
Play with Docker / Play with Kubernetes / Play with iximiuz Labs
unix:///var/run/docker.sock
$XDG_RUNTIME_DIR/docker.sock
docker -H unix://$XDG_RUNTIME_DIR/docker.sock version
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
echo 'export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock' >> ~/.bashrc
source ~/.bashrc