Browse Source

added podman install to install.sh

feature/startup-from-labels
Mario Alegre 5 years ago
parent
commit
45b5b06e57
  1. 33
      install.sh

33
install.sh

@ -1,13 +1,36 @@
#1/bin/bash
# todo: actually install podman
distro=$(lsb_release -is)
release=$(lsb_release -rs)
if [[ $distro == "Debian" ]]; then
echo "Detected distro: Debian"
if [[ $release == "10" ]]; then
echo "Detected release: 10"
release=10
elif [[ $release == "testing" ]]; then
echo "Detected release: testing"
release=Testing
else
echo "Error: failed to detect release"
exit 1
fi
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_$release/ /" > /etc/apt/sources.list.d/podman.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_$release/Release.key | sudo apt-key add -
apt update -y
apt install -y podman
else
echo "Error: failed to detect distro"
exit 1
fi
# copy bin files to /usr/local/bin
rsync -vaSH bin/ /usr/local/bin/
sudo rsync -vaSH bin/ /usr/local/bin/
# copy shflags to /usr/local/bin as well
rsync -vaSH lib/shflags /usr/local/bin/
sudo rsync -vaSH lib/shflags /usr/local/bin/
# install systemd startup service
rsync -vaSH lib/containers-startup.service /etc/systemd/system/
systemctl enable containers-startup.service
#sudo rsync -vaSH lib/containers-startup.service /etc/systemd/system/
#sudo systemctl enable containers-startup.service

Loading…
Cancel
Save