2020-10-07 13:49:40 +05:00
|
|
|
#!/bin/bash -e
|
2020-01-24 19:51:04 +00:00
|
|
|
################################################################################
|
|
|
|
|
## File: containers.sh
|
|
|
|
|
## Desc: Installs container tools: podman, buildah and skopeo onto the image
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2020-12-31 10:00:43 +03:00
|
|
|
source $HELPER_SCRIPTS/os.sh
|
|
|
|
|
|
2020-12-02 18:46:08 +07:00
|
|
|
# Install podman, buildah, scopeo container's tools
|
|
|
|
|
install_packages=(podman buildah skopeo)
|
2020-01-24 19:51:04 +00:00
|
|
|
source /etc/os-release
|
2020-11-30 18:22:41 +03:00
|
|
|
sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
|
2020-01-24 19:51:04 +00:00
|
|
|
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key
|
2020-12-07 15:48:49 +03:00
|
|
|
apt-key add Release.key
|
2020-01-24 19:51:04 +00:00
|
|
|
apt-get update -qq
|
2020-12-02 18:46:08 +07:00
|
|
|
apt-get -qq -y install ${install_packages[@]}
|
2020-01-24 19:51:04 +00:00
|
|
|
mkdir -p /etc/containers
|
|
|
|
|
echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/containers/registries.conf
|
2020-12-02 18:46:08 +07:00
|
|
|
|
2020-12-31 10:00:43 +03:00
|
|
|
if isUbuntu18 || isUbuntu20 ; then
|
|
|
|
|
invoke_tests "Tools" "Containers"
|
|
|
|
|
fi
|