Skip to content

Commit

Permalink
Merge pull request #22 from MingliuYan/let-podman-service-serve-as-a-…
Browse files Browse the repository at this point in the history
…docker-service

Let podman service serve as a docker service
  • Loading branch information
jsrc27 authored Feb 20, 2024
2 parents b5c45b6 + b9c141a commit 8a99af3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion recipes-containers/docker/files/docker.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target docker.socket firewalld.service containerd.service usermount.service
After=network-online.target docker.socket firewalld.service containerd.service usermount.service time-set.target
Before=boot-complete.target
Wants=network-online.target containerd.service usermount.service
Requires=docker.socket
Expand Down
6 changes: 6 additions & 0 deletions recipes-containers/podman/podman_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ do_install:append () {
# API session does not expire
sed -i -e 's#^ExecStart=\(.*\)$#ExecStart=\1 -t 0#g' ${D}${systemd_unitdir}/system/podman.service

# After network-online.target, nss-lookup.target, time-set.target, firewalld.service, usermount.service
sed -i -e 's#^After=\(.*\)$#After=\1 network-online.target nss-lookup.target time-set.target firewalld.service usermount.service#g' ${D}${systemd_unitdir}/system/podman.service

# Wants network-online.target, usermount.service
sed -i -e '/After=/a Wants=network-online.target usermount.service' ${D}${systemd_unitdir}/system/podman.service

# Add alias docker.service to podman.service
echo "Alias=docker.service" >> ${D}${systemd_unitdir}/system/podman.service
fi
Expand Down

0 comments on commit 8a99af3

Please sign in to comment.