Hirotaka Wakabayashi ab3563d621 Fixes the DIB script
This PR adds the "-y" option to the "add-apt-repository" script to
prevent from asking the yes/no question while installing openstack
automatically.

Change-Id: Ic6c86b95da28c4a3f2ab0a4c918e291a7e1b9bb3
2024-01-30 03:06:44 +00:00

21 lines
540 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
GUEST_USERNAME=${GUEST_USERNAME:-"ubuntu"}
echo "Installing docker"
export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${DIB_RELEASE} stable"
apt-get update
apt-get install -y -qq docker-ce >/dev/null
apt-get clean
echo "Adding ${GUEST_USERNAME} user to docker group"
usermod -aG docker ${GUEST_USERNAME}