+ support docker install on ubuntu system (with appropriate gpg key and apt-repo)
This commit is contained in:
		| @ -5,15 +5,23 @@ if [[ -z "${SERVER}" ]]; then echo 'No SERVER'; exit 1; fi | ||||
|  | ||||
| #https://docs.docker.com/engine/install/debian/ | ||||
|  | ||||
| TARGET_OS=debian | ||||
|  | ||||
| if [[ "$2" -eq "ubuntu" ]]; then | ||||
|   TARGET_OS=ubuntu | ||||
| fi | ||||
|  | ||||
| echo "Choosen OS: ${TARGET_OS}" | ||||
|  | ||||
| ssh root@${SERVER} bash -- << EOF | ||||
| set -e | ||||
| apt update -qq | ||||
| apt-get install ca-certificates curl -qq | ||||
| install -m 0755 -d /etc/apt/keyrings | ||||
| curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc | ||||
| curl -fsSL https://download.docker.com/linux/${TARGET_OS}/gpg -o /etc/apt/keyrings/docker.asc | ||||
| chmod a+r /etc/apt/keyrings/docker.asc | ||||
| echo \ | ||||
|   "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ | ||||
|   "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/${TARGET_OS} \ | ||||
|   \$(. /etc/os-release && echo "\$VERSION_CODENAME") stable" | \ | ||||
|   tee /etc/apt/sources.list.d/docker.list > /dev/null | ||||
| apt update -qq | ||||
|  | ||||
		Reference in New Issue
	
	Block a user