From e62b596431dcc6b0dda490e251b145842aec7838 Mon Sep 17 00:00:00 2001 From: Seokho Son Date: Fri, 14 Oct 2022 04:30:48 +0900 Subject: [PATCH] Simplify docker install --- scripts/installDocker.sh | 43 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/scripts/installDocker.sh b/scripts/installDocker.sh index 34b901a6c..6b27e7e97 100644 --- a/scripts/installDocker.sh +++ b/scripts/installDocker.sh @@ -1,25 +1,28 @@ #!/bin/bash -# Need to be executed with sudo -echo "[Install Docker]" +# Install using the convenience script +# Docker provides a convenience script at get.docker.com to install Docker into development +# environments quickly and non-interactively. The convenience script is not recommended for +# production environments, but can be used as an example to create a provisioning script that +# is tailored to your needs. Also refer to the install using the repository steps to +# learn about installation steps to install using the package repository. +# The source code for the script is open source, and can be found in the docker-install repository on GitHub. -echo -echo "Will run the following command (the script needs to be executed with sudo)" -echo "1) sudo apt update -y" -echo "2) wget -qO- get.docker.com | sh" -echo "3) sudo docker -v" +# OS requirement (one of the followings) +# Ubuntu Jammy 22.04 (LTS) +# Ubuntu Impish 21.10 +# Ubuntu Focal 20.04 (LTS) +# Ubuntu Bionic 18.04 (LTS) +# Debian Bullseye 11 (stable) +# Debian Buster 10 (oldstable) +# Raspbian Bullseye 11 (stable) +# Raspbian Buster 10 (oldstable) +# Fedora 34 +# Fedora 35 +# Fedora 36 +# CentOS 7, CentOS 8 (stream), or CentOS 9 (stream) +# RHEL 7, RHEL 8 or RHEL 9 on s390x (IBM Z) -# Check Docker engine -if ! sudo docker -v 2>&1; then - # update - echo "[apt update]" - sudo apt update -y - - # install Docker - echo "[install Docker engine]" - wget -qO- get.docker.com | sh -fi - -# installation checking -echo [sudo docker -v] +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh sudo docker -v