Skip to content

Commit 28bc953

Browse files
committed
install.sh: Add a comment with manual instructions
The comment at the end of the install script makes it convenient to get the installation instructions with just `curl https://get.docker.com`. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1 parent c04fb16 commit 28bc953

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

install.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,3 +762,47 @@ do_install() {
762762
# wrapped up in a function so that we have some protection against only getting
763763
# half the file during "curl | sh"
764764
do_install
765+
766+
: <<'MANUAL_INSTALL_DOCS'
767+
Manual setup: https://docs.docker.com/engine/install/
768+
769+
# Fedora / RHEL
770+
771+
sudo dnf -y install dnf-plugins-core
772+
773+
# dnf5
774+
sudo dnf5 config-manager addrepo --from-repofile https://download.docker.com/linux/$(. /etc/os-release && echo $ID)/docker-ce.repo
775+
# dnf older than 5
776+
sudo dnf config-manager --add-repo https://download.docker.com/linux/$(. /etc/os-release && echo $ID)/docker-ce.repo
777+
778+
779+
sudo dnf install docker-ce
780+
sudo systemctl enable --now docker
781+
782+
# ======
783+
784+
# Ubuntu / Debian
785+
786+
sudo apt update
787+
sudo apt install -y ca-certificates curl
788+
sudo install -m 0755 -d /etc/apt/keyrings
789+
sudo curl -fsSL https://download.docker.com/linux/$(. /etc/os-release && echo "$ID")/gpg -o /etc/apt/keyrings/docker.asc
790+
sudo chmod a+r /etc/apt/keyrings/docker.asc
791+
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
792+
Types: deb
793+
URIs: https://download.docker.com/linux/$(. /etc/os-release && echo "$ID")
794+
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
795+
Components: stable
796+
Architectures: $(dpkg --print-architecture)
797+
Signed-By: /etc/apt/keyrings/docker.asc
798+
EOF
799+
sudo apt update
800+
sudo apt install docker-ce
801+
802+
# ======
803+
804+
Post-install: run Docker as non-root
805+
806+
sudo usermod -aG docker $USER
807+
(log out and back in for the group change to take effect)
808+
MANUAL_INSTALL_DOCS

0 commit comments

Comments
 (0)