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

Question regarding Podman compatibility? #10

Open
c-goes opened this issue May 26, 2021 · 4 comments · May be fixed by #11
Open

Question regarding Podman compatibility? #10

c-goes opened this issue May 26, 2021 · 4 comments · May be fixed by #11

Comments

@c-goes
Copy link
Contributor

c-goes commented May 26, 2021

Hello
Would you accept a PR to make this image compatible with rootless podman?
I realized that your Debian 10 image works without issues but this one does not. Discussion is here

containers/podman#8545 (comment)

This issue is probably caused by the VOLUMES in this repo's Dockerfile.

@geerlingguy
Copy link
Owner

What kind of changes would it entail? I have to admit I still don't use Podman much myself at this time.

c-goes added a commit to c-goes/docker-ubuntu2004-ansible that referenced this issue May 30, 2021
- Fixes the problem described in geerlingguy#10
@c-goes c-goes linked a pull request May 30, 2021 that will close this issue
@c-goes
Copy link
Contributor Author

c-goes commented May 30, 2021

I made the PR in #11 but am not sure if everything continues to work in Docker. I made it look like your Debian image. Especially, /run mount is removed.

@jwillikers
Copy link

Podman support would be great.

@dbrennand
Copy link

dbrennand commented Mar 18, 2023

Hey @c-goes @jwillikers @geerlingguy

I've been using this container image to test a PR in the geeringguy.security role.

I'm using an M1 MacBook so I installed Podman via brew, and have to run a VM for Podman via podman machine:

(ansible-role-security) ➜  ansible-role-security git:(refactor/ssh-regexp) ✗ podman --version     
podman version 4.3.1

(ansible-role-security) ➜  ansible-role-security git:(refactor/ssh-regexp) ✗ podman machine info  
Host:
  Arch: arm64
  CurrentMachine: podman-machine-default
  DefaultMachine: podman-machine-default
  EventsDir: /var/folders/04/bz4g6f_93ql7s4zv0jbz_q4h0000gn/T/podman-run--1/podman
  MachineConfigDir: /Users/dab/.config/containers/podman/machine/qemu
  MachineImageDir: /Users/dab/.local/share/containers/podman/machine/qemu
  MachineState: Running
  NumberOfMachines: 1
  OS: darwin
  VMType: qemu
Version:
  APIVersion: 4.3.1
  Built: 1668026638
  BuiltTime: Wed Nov  9 20:43:58 2022
  GitCommit: ""
  GoVersion: go1.18.8
  Os: darwin
  OsArch: darwin/arm64
  Version: 4.3.1

I've then installed molecule and the Podman molecule driver:

pip install molecule molecule-plugins

Here is my molecule.yml which has systemd working in the container for me:

---
role_name_check: 1
dependency:
  name: galaxy
driver:
  name: podman
platforms:
  - name: instance
    image: geerlingguy/docker-ubuntu2004-ansible
    tmpfs:
      - /run
      - /tmp
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    capabilities:
      - SYS_ADMIN
    command: "/lib/systemd/systemd"
    pre_build_image: true
provisioner:
  name: ansible
  playbooks:
    converge: ${MOLECULE_PLAYBOOK:-converge.yml}
root@instance:/# systemctl is-system-running
degraded

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 a pull request may close this issue.

4 participants