aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-12-16 12:12:22 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-12-16 12:12:22 +0100
commitcfe93fcd921f7b202299dc1b8e29a26da8fbc336 (patch)
tree5c922e3014cbbd7f0b158ecda2fe0ec1e1c66035
parentc6976f51c254b930dbe2ff479749f14e162f1742 (diff)
downloadpodman-docker-builder-cfe93fcd921f7b202299dc1b8e29a26da8fbc336.tar.gz
tweak config for podman 2
-rwxr-xr-xconfigure-podman16
1 files changed, 12 insertions, 4 deletions
diff --git a/configure-podman b/configure-podman
index c2c4016..2fafa59 100755
--- a/configure-podman
+++ b/configure-podman
@@ -15,10 +15,18 @@ 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
+if test -f /usr/share/containers/containers.conf; then
+ file="containers.conf"
+else
+ file="libpod.conf"
+fi
+echo "# update podman cgroups config ($file)"
+cp /usr/share/containers/${file} /etc/containers
+sed -i.orig \
+ -e '/cgroup_manager/s/^# //' \
+ -e '/cgroup_manager/s/systemd/cgroupfs/' \
+ /etc/containers/${file}
+diff -u /etc/containers/${file}.orig /etc/containers/${file}
echo "# silence docker emulation notification"
touch /etc/containers/nodocker