Files
sashimono/installer/docker-install.sh
Ravin Perera 737c3c0af0 Revamped Sashimono installation process. (#27)
- During development, binaries and data exist in build dir.
- In production, binaries in '/usr/bin/sashimono-agent' and data in '/etc/sashimono'.
- Added prerequisites script for easy machine preparation.
- Added cloud installation scripts.
- Added non-interactive installation scripts for fully automated setup of test vms.
- sagent must now be run as root (in development as well as in production)
2021-07-12 15:00:11 +05:30

26 lines
741 B
Bash
Executable File

#!/bin/bash
# Rootless docker installation script.
docker_bin=$(realpath $1)
# Silently exit if docker_bin is not empty.
[ ! -z "$(ls -A $docker_bin 2>/dev/null)" ] && exit 0
mkdir -p $docker_bin
# Download docker packages into a tmp dir and extract into docker bin.
echo "Installing rootless docker packages into $docker_bin"
tmp=$(mktemp -d)
cd $tmp
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.7.tgz --output docker.tgz
curl https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.7.tgz --output rootless.tgz
cd $docker_bin
tar zxf $tmp/docker.tgz --strip-components=1
tar zxf $tmp/rootless.tgz --strip-components=1
rm -r $tmp
chown -R $(id -u):$(id -g) $docker_bin/*
exit 0