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

Enable use of podman to run tests #654

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomhughes
Copy link
Member

This adds support for using podman to run tests - you just need to run systemctl --user enable --now podman.socket to enable the podman socket for your user and that you can run tests as normal.

Note that until test-kitchen/kitchen-dokken#323 is merged you need to set DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock in the environment to make it work.

@Firefishy
Copy link
Member

Firefishy commented Apr 4, 2024

I tested this on a Mac using podman machine... I was only able to get this to work after stripping out all the docker_host_url lines and just setting podman = true

Podman on Mac uses an unconventional socket.
DOCKER_HOST=unix:///var/folders/kv/sb3s4k3n0zq27rtr2yd_2lc00000gn/T/podman/podman-machine-default-api.sock
Podman can also set a /var/run/docker.sock symlink, but this isn't done by default due to requiring extra permissions.

@tomhughes
Copy link
Member Author

That sounds like you were trying to use rootful podman not rootless.

On linux you can enable the system podman.socket which uses /run/podman/podman.sock and which /run/docker.sock points at (if you have podman-docker installed) or you can enable a per-user socket by starting the user podman.socket unit for a user.

The system one is only available to root so isn't very useful here while the per-user one is only available to the user that started it - there is no equivalent to the docker group on Ubuntu/Debian that allows everybody in it to access the global instance.

@Firefishy
Copy link
Member

Likely complicated by the use of podman machine... But I appears to be rootless

podman info reports:

host:
  security:
    rootless: true

@tomhughes
Copy link
Member Author

What do you mean by using podman machine though? You shouldn't be interacting with podman directly at all, just with kitchen by doing something like bundle exec kitchen test apache-ubuntu-2204.

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

Successfully merging this pull request may close these issues.

None yet

2 participants