bbb-pre-install.sh: fix some error installing 'docker-ce'.
This commit is contained in:
parent
a97f1b11ea
commit
7c327d8e54
@ -519,6 +519,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blank_line
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Install latest version of docker
|
# Install latest version of docker
|
||||||
# ---
|
# ---
|
||||||
@ -527,12 +529,15 @@ echo ""
|
|||||||
echo -e " \033[1m---\033[m"
|
echo -e " \033[1m---\033[m"
|
||||||
echo -e " \033[32mInstall latest version of docker\033[m"
|
echo -e " \033[32mInstall latest version of docker\033[m"
|
||||||
echo -e " \033[1m---\033[m"
|
echo -e " \033[1m---\033[m"
|
||||||
echo ""
|
|
||||||
|
|
||||||
:> "$log_file"
|
:> "$log_file"
|
||||||
if ! $(grep -Eq "^\s*deb\s+.*https://download.docker.com/linux/ubuntu\s+$DIST_CODENAME\s+stable" /etc/apt/sources.list) \
|
#if ! $(grep -Eq "^\s*deb\s+.*https://download.docker.com/linux/ubuntu\s+$DIST_CODENAME\s+stable" /etc/apt/sources.list) \
|
||||||
&& ! $(grep -r -Eq "^\s*deb\s+.*https://download.docker.com/linux/ubuntu\s+$DIST_CODENAME\s+stable" /etc/apt/sources.list.d/*)
|
# && ! $(grep -r -Eq "^\s*deb\s+.*https://download.docker.com/linux/ubuntu\s+$DIST_CODENAME\s+stable" /etc/apt/sources.list.d/*)
|
||||||
|
if ! $(grep -r -Eq "^\s*deb\s+.*https://download.docker.com/linux/ubuntu\s+$DIST_CODENAME\s+stable" /etc/apt/*)
|
||||||
then
|
then
|
||||||
|
|
||||||
|
blank_line
|
||||||
|
|
||||||
echononl "Add GPG key for official Docker repository.."
|
echononl "Add GPG key for official Docker repository.."
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg 2> "$log_file" | apt-key add - >> "$log_file" 2>&1
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg 2> "$log_file" | apt-key add - >> "$log_file" 2>&1
|
||||||
|
|
||||||
@ -553,6 +558,28 @@ then
|
|||||||
echo_ok
|
echo_ok
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echononl "Add (official) Docker-Repository to APT sources.."
|
||||||
|
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${DIST_CODENAME} stable" > "$log_file" 2>&1
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo_failed
|
||||||
|
error "$(cat "$log_file")"
|
||||||
|
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/no]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Interrupted by user."
|
||||||
|
|
||||||
|
else
|
||||||
|
echo_ok
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echononl "Update repositories.."
|
echononl "Update repositories.."
|
||||||
apt-get update > "$log_file" 2>&1
|
apt-get update > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
@ -581,7 +608,7 @@ echononl "Install docker-ce .."
|
|||||||
if $(dpkg -s docker-ce> /dev/null 2>&1 ) ; then
|
if $(dpkg -s docker-ce> /dev/null 2>&1 ) ; then
|
||||||
echo_skipped
|
echo_skipped
|
||||||
else
|
else
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes language-pack-en > "$log_file" 2>&1
|
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes docker-ce > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat "$log_file")"
|
error "$(cat "$log_file")"
|
||||||
|
Loading…
Reference in New Issue
Block a user