Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman suport, using podmans docker compatibility mode nearly works but crashes Overview and Containers pages #181

Open
Wabuo opened this issue Jan 2, 2024 · 3 comments

Comments

@Wabuo
Copy link

Wabuo commented Jan 2, 2024

Describe the bug
Feature request/help me debug

Make dockerman work with podmans docker compatibility mode / help me debug.
Currently, most things work, but the Overview and Containers pages crash.

This would be awesome because podman works with nftables if you "manually" configure the network, and podman provides the possibility to run containers as none root user aka unprivileged containers.

What did I do to test this

  1. Install podman according to this guide https://openwrt.org/docs/guide-user/virtualization/docker_host#podman
  2. Don't worry about the configuration files, they get installed by the packages looking exactly like the example ones in the guide. Except for the ones that define a specific container.
  3. Force remove the docker package with opkg remove docker --force-depends
  4. Create a one-line shell scrip wrapper called docker in /usr/bin/docker according to this guide https://podman-desktop.io/docs/migrating-from-docker/emulating-docker-cli-with-podman.
#!/bin/sh
[ -e /etc/containers/nodocker ] || \
echo "Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.>
exec podman "$@"
  1. Create a symbolic link from /var/run/docker.sock to /run/podman/podman.sock ln -s /var/run/docker.sock /run/podman/podman.sock
  2. enable the podman service /etc/init.d/podman enable
  3. If /var isn't persistent, add the symlink creation to your /etc/rc.local
/etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

## Podman

# create podman docker emulation socket
ln -s /run/podman/podman.sock /var/run/docker.sock

...
  1. reboot and test dockerman.



PS: I'm willing to create a proper podman-docker compatibility package for OpenWrt, but would like to get dockerman working first.

Version information

  • openwrt version: 23.05.2
  • luci version: git-23.051.66410-a505bb1
  • docker daemon version: -
  • podman version: 4.8.0-1
root@OpenWrtR4S ~# podman version
Client:       Podman Engine
Version:      4.8.0
API Version:  4.8.0
Go Version:   go1.21.5
Built:        Tue Dec 19 02:55:03 2023
OS/Arch:      linux/arm64
  • dockerman version: v0.5.13-20230114
@Wabuo
Copy link
Author

Wabuo commented Jan 5, 2024

A few pictures:

Configuration page
Screenshot from 2024-01-05 20-37-52

Overview page
Screenshot from 2024-01-05 20-38-03

Containers page
Screenshot from 2024-01-05 20-39-57

Images page (no clue why it's broken now, it was working before)
Screenshot from 2024-01-05 20-40-12

Networks page
Screenshot from 2024-01-05 20-40-29

Volumes page
Screenshot from 2024-01-05 20-40-47

Event page
Screenshot from 2024-01-05 20-41-01

So as you can see it's kinda working but needs some attention.

My understanding is that it should be possible to get it to work, I will try, but this is my first adventure in to lua and in to luci, so I don't have the highest hopes.

@Wabuo
Copy link
Author

Wabuo commented Jan 5, 2024

Podman or more accurate netavark seems to be getting proper native nftables support soon, see containers/netavark#883

@lisaac
Copy link
Owner

lisaac commented Jan 6, 2024

It seems that the podman compat api a little bit differently from Docker, will fix it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants