Skip to content

Commit 79528d8

Browse files
Integrating a revert guide
Signed-off-by: Anatoli Nicolae <[email protected]>
1 parent 427fd6d commit 79528d8

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

notes/install-podman.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ queries:
1010
- how to install docker
1111
---
1212

13-
<Warning>
13+
<Error>
1414

1515
Podman interferes with typical ApisCP behaviour, changing firewall rules to accomodate container routing definitions.
1616

1717
A side-effect of this behaviour manifests with containers becoming unresponsive when accessing exposed ports form the host or outside world, as firewall rules are refreshed on the panel's side efectively removing Podman-added rules.
1818

19+
</Error>
20+
21+
<Warning>
22+
1923
Docker is a preferred alternative in this case.
2024

2125
</Warning>
2226

27+
## Installing Podman
28+
2329
Podman is the supported drop-in replacement for RHEL 8+.
2430

2531
To install Podman, run the following commands:
@@ -36,3 +42,51 @@ In order for containers to keep running, you need to [tell systemd to linger you
3642
loginctl show-user <user> --property Linger
3743
loginctl enable-linger <user>
3844
```
45+
46+
## Switching from Podman back to Docker
47+
48+
Switching back is quite an easy process:
49+
50+
```bash
51+
# Remove podman or other docker-related packages
52+
dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc
53+
54+
# Add Docker CE repo
55+
dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
56+
57+
# Install docker-ce package
58+
dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
59+
60+
# Stop unit for reconfiguration
61+
systemctl stop docker
62+
63+
# Fix ExecStart definition with a unit override
64+
mkdir -p /etc/systemd/system/docker.service.d
65+
cat << EOF > /etc/systemd/system/docker.service.d/override.conf
66+
[Service]
67+
# This clears any ExecStart= inherited from docker.service
68+
ExecStart=
69+
ExecStart=/usr/bin/dockerd --containerd=/run/containerd/containerd.sock
70+
EOF
71+
72+
# Reload systemd daemon
73+
systemctl daemon-reload
74+
75+
# Docker group should be created by default, but just in case
76+
groupadd --system docker
77+
78+
# Allow docker to be accessible under /.socket
79+
echo -e '{\n\t"hosts": ["unix:///var/run/docker.sock", "unix:///.socket/docker.sock"],\n\t"group": "docker"\n}' > /etc/docker/daemon.json
80+
81+
# Enable and start the unit
82+
systemctl enable --now docker
83+
84+
# Check if this returns an empty list of containers. If it returns an error, investigate.
85+
docker ps
86+
```
87+
88+
<Check>
89+
90+
If you have systemd-backed container definitions you will need to recreate containers in Docker via `docker run` or `docker-compose`.
91+
92+
</Check>

0 commit comments

Comments
 (0)