Update file run_onchange_before_11-install-docker.tmpl
This commit is contained in:
parent
05987137cb
commit
8b487823da
1 changed files with 9 additions and 2 deletions
|
@ -31,9 +31,16 @@ elif command -v apt-get > /dev/null; then
|
|||
sudo apt-get update
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
elif command -v dnf > /dev/null; then
|
||||
# Fedora
|
||||
. /etc/os-release
|
||||
if [ "$ID" == 'centos' ]; then
|
||||
logg info 'Installing Docker on CentOS'
|
||||
elif [ "$ID" == 'fedora' ]; then
|
||||
logg info 'Installing Docker on Fedora'
|
||||
else
|
||||
logg error 'Unknown OS - cannot install Docker' && exit 1
|
||||
fi
|
||||
sudo dnf -y install dnf-plugins-core
|
||||
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||
sudo dnf config-manager --add-repo "https://download.docker.com/linux/$ID/docker-ce.repo"
|
||||
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
elif command -v yum > /dev/null; then
|
||||
# CentOS
|
||||
|
|
Loading…
Reference in a new issue