Skip to content

Commit

Permalink
Install default version of docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Volak committed Sep 13, 2022
1 parent db3ac96 commit e3bc4e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ Automatically installed software:
- loki-docker-driver
- openssl

NOTE: For migration from older version of docker to newer see https://docs.docker.com/engine/install/ubuntu/. <br>
To configure permission, follow https://docs.docker.com/engine/install/linux-postinstall/.

NOTE: It may happen that swarm initialization will fail during install. Most likely due to multiple network interfaces present.
In that case run `docker swarm init --advertise-addr <ip-addr>` command to tell swarm which ip address to use for inter-manager communication and overlay networking

Expand Down
12 changes: 1 addition & 11 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function installPrerequisities {
apt-get install software-properties-common
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update -qq
apt-get install -qq -y $dockerInstallVersion
apt-get install -qq -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

if [[ "${__NO_SWARM}" == "false" ]]; then
echo -e "${INFO} Initializing docker in swarm mode"
Expand Down Expand Up @@ -287,15 +287,6 @@ function checkDockerGroup {
}


function selectDockerVersion {
dockerInstallVersion="docker-ce=5:18.09.9~3-0~ubuntu-bionic"
ubuntuVersion=$(grep "VERSION_ID" /etc/os-release | cut -d '=' -f2 | sed 's\"\\g')
if [[ "${ubuntuVersion}" == "20."* ]]; then
dockerInstallVersion="docker-ce=5:20.10.5~3-0~ubuntu-focal"
fi
}


function addEnvToFile {
unset __old_env_var
unset __new_env_var
Expand Down Expand Up @@ -344,7 +335,6 @@ function unsetVariableFile {
# =======================================
# Program starts here
# =======================================
selectDockerVersion

scriptName="$(basename "${0}")"
FM_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
Expand Down

0 comments on commit e3bc4e1

Please sign in to comment.