]> gitweb.fluxo.info Git - trashman.git/commitdiff
Feat: adds podman for Ubuntu
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 31 Mar 2021 21:18:14 +0000 (18:18 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 31 Mar 2021 21:18:14 +0000 (18:18 -0300)
share/trashman/php7/unix/linux/debian/install
share/trashman/podman/info [new file with mode: 0644]
share/trashman/podman/unix/linux/ubuntu/install [new file with mode: 0755]

index 0db691c74743897605fd23aa7ab28a64b00fd013..489d38ce990990ca2ce64aa9431977f139bbd490 100755 (executable)
@@ -11,11 +11,10 @@ VERSION="7.3"
 . $SHARE/trashman/functions || exit 1
 
 # Requirements
-trashman_require wget lsb-release apt-transport-https ca-certificates 
+trashman_require wget lsb-release apt-transport-https ca-certificates
 
 # Install
 #wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
 cp $SHARE/php7/unix/linux/debian /etc/apt/trusted.gpg.d/php.gpg
 echo "deb https://packages.sury.org/php/ `lsb_release -sc` main" | tee /etc/apt/sources.list.d/php$VERSION.list
-apt update
-apt install php$VERSION
+trashman_apt_install php$VERSION
diff --git a/share/trashman/podman/info b/share/trashman/podman/info
new file mode 100644 (file)
index 0000000..f33ef80
--- /dev/null
@@ -0,0 +1 @@
+engine to run OCI-based containers in Pods
diff --git a/share/trashman/podman/unix/linux/ubuntu/install b/share/trashman/podman/unix/linux/ubuntu/install
new file mode 100755 (executable)
index 0000000..f5236ae
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/env sh
+#
+# Install Podman on Ubuntu
+# Adapted from https://podman.io/getting-started/installation
+#
+
+# Parameters
+SHARE="$1"
+VERSION="7.3"
+
+# Include basic functions
+. $SHARE/trashman/functions || exit 1
+
+# Load OS-related info
+. /etc/os-release || exit 1
+
+# Parse distro version
+VERSION="`echo $VERSION_ID | tr -d '.'`"
+
+# Only use packages from Kubic if on Ubuntu 20.04 or below
+if [ "$NAME" == "Ubuntu" ] && (($VERSION <= 2004)); then
+  echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:testing.list
+  curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
+fi
+
+# Install podman
+trashman_apt_install podman
+
+# Docker compose
+#trashman_apt_install docker-compose
+#trashman_apt_install python3-pip
+#pip3 install podman-compose