Skip to content

Commit

Permalink
Merge pull request #12 from hexfusion/install-podman
Browse files Browse the repository at this point in the history
Install podman
  • Loading branch information
hexfusion committed Jun 24, 2023
2 parents 72a8e17 + 7d6ffc5 commit c5cdf94
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions vms/rpcchainvm/runtime/scripts/install-podman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

set -x

# TODO: error if !linux

export PKG_CONFIG_PATH="/usr/lib/pkgconfig"

# install deps
apt-get install -y \
runc libsystemd-dev \
libgpgme-dev libseccomp-dev \
libbtrfs-dev libdevmapper-dev \
build-essential btrfs-progs \
crun go-md2man \
iptables libassuan-dev \
libbtrfs-dev libc6-dev \
libglib2.0-dev libgpg-error-dev \
libprotobuf-dev libprotobuf-c-dev \
libseccomp-dev libselinux1-dev \
libsystemd-dev pkg-config \
uidmap catatonit

GOARCH=$(go env GOARCH)
GOOS=$(go env GOOS)
BINDIR=${BINDIR:-/usr/local/bin}

# Podman requires conmon which monitors OCI runtimes
function install_conmon {
local version=2.1.7
local download_url="https://github.com/containers/conmon/releases/download/v${version}/conmon.${GOARCH}"
local download_path=/tmp/conmon

curl --fail -L ${download_url} -o ${download_path}
echo "installing conmon to ${BINDIR}"
chmod +x ${download_path}
mv ${download_path} ${BINDIR}/

conmon --version
}

function install_podman {
local version=4.5.1
local github_url=https://github.com/containers/podman
local download_path=/tmp/podman/

git clone ${github_url} ${download_path}
cd "${download_path}"
git checkout v${version}
make BUILDTAGS="selinux seccomp" PREFIX=/usr
make install PREFIX=/usr
podman --version
}

install_conmon

install_podman

echo "install complete..."
echo "run the below as non root user"
echo "systemctl enable --user podman.socket"
echo "systemctl start --user podman.socket"

0 comments on commit c5cdf94

Please sign in to comment.