Tinkerbell.Sandbox/deploy/vagrant/basebox/ubuntu1804/provision.sh
Manuel Mendez 5eceec91ed box: make lists be multiline and with same line ending
Better for adding/removing things this way.

Signed-off-by: Manuel Mendez <mmendez@equinix.com>
2021-04-27 20:05:49 +00:00

53 lines
1.0 KiB
Bash

#!/bin/bash
# abort this script on errors
set -euxo pipefail
setup_docker() (
# steps from https://docs.docker.com/engine/install/ubuntu/
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common \
;
curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
sudo apt-key add -
local repo
repo=$(
printf "deb [arch=amd64] https://download.docker.com/linux/ubuntu %s stable" \
"$(lsb_release -cs)"
)
sudo add-apt-repository "$repo"
sudo apt-get update
sudo apt-get install -y \
containerd.io \
docker-ce \
docker-ce-cli \
;
)
setup_docker_compose() (
# from https://docs.docker.com/compose/install/
sudo curl -L \
"https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" \
-o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
)
main() (
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
setup_docker
setup_docker_compose
sudo apt-get install -y jq
sudo usermod -aG docker vagrant
)
main