This aligns the approach taken between rpm- and deb-based installations to first
collect the list of packages to install in a `$pkgs` variable, and then install
them all, instead of executing an install for each of them.
With this change:
Fedora
DRY_RUN=1 ./install.sh
# Executing docker install script, commit:
dnf install -y -q dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
dnf makecache
dnf install -y -q docker-ce docker-ce-cli docker-scan-plugin docker-ce-rootless-extras
CentOS
DRY_RUN=1 ./install.sh
# Executing docker install script, commit:
yum install -y -q yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache
yum install -y -q docker-ce docker-ce-cli docker-scan-plugin docker-ce-rootless-extras
Ubuntu
DRY_RUN=1 ./install.sh
# Executing docker install script, commit:
apt-get update -qq >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /usr/share/keyrings/docker-archive-keyring.gpg
chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable" > /etc/apt/sources.list.d/docker.list
apt-get update -qq >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends docker-ce-cli docker-scan-plugin docker-ce >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce-rootless-extras >/dev/null
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker/docker-install
Home of the script that lives at get.docker.com and test.docker.com!
The purpose of the install script is for a convenience for quickly installing the latest Docker-CE releases on the supported linux distros. It is not recommended to depend on this script for deployment to production systems. For more thorough instructions for installing on the supported distros, see the install instructions.
This repository is solely maintained by Docker, Inc.
Usage:
From https://get.docker.com:
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
From https://test.docker.com:
curl -fsSL https://test.docker.com -o test-docker.sh
sh test-docker.sh
From the source repo (This will install latest from the stable channel):
sh install.sh
Testing:
To verify that the install script works amongst the supported operating systems run:
make shellcheck
Legal
Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.
Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.
For more information, please see https://www.bis.doc.gov
Reporting security issues
The maintainers take security seriously. If you discover a security issue, please bring it to their attention right away!
Please DO NOT file a public issue, instead send your report privately to security@docker.com.
Security reports are greatly appreciated and we will publicly thank you for it. We also like to send gifts—if you're into Docker schwag, make sure to let us know. We currently do not offer a paid security bounty program, but are not ruling it out in the future.
Licensing
docker/docker-install is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.