Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify docker install script #1200

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions scripts/installDocker.sh
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