aboutsummaryrefslogtreecommitdiffstats
path: root/configure-podman
blob: 551d607a3cba9f9c47879d6c79f982ba43557228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# need to tweak some config options so "podman build" can run inside a docker container in gitlab ci
#

echo "# update & install packages"
dnf update -y
dnf install -y podman podman-docker buildah
dnf clean all -y

# storage: can't use overlay, docker does that already and it can't be nested.
echo "# update podman storage config"
sed -i.orig -e '/^driver/s/overlay/vfs/' /etc/containers/storage.conf
diff -u /etc/containers/storage.conf.orig /etc/containers/storage.conf

# cgroups: there is no systemd managing the container, so use cgroupfs directly
echo "# update podman cgroups config"
cp /usr/share/containers/libpod.conf /etc/containers
sed -i.orig -e '/^cgroup_manager/s/systemd/cgroupfs/' /etc/containers/libpod.conf
diff -u /etc/containers/libpod.conf.orig /etc/containers/libpod.conf

echo "# silence docker emulation notification"
touch /etc/containers/nodocker

exit 0