-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1200 from seokho-son/main
Simplify docker install script
- Loading branch information
Showing
1 changed file
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |