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

RootlessKit port driver #426

Closed
msladek opened this issue Aug 6, 2024 · 3 comments
Closed

RootlessKit port driver #426

msladek opened this issue Aug 6, 2024 · 3 comments
Assignees

Comments

@msladek
Copy link
Contributor

msladek commented Aug 6, 2024

I run reverse proxies in a docker rootless setup and need source IP propagation. Thus in my employments I extended your role with the following task for changing the RootlessKit's port driver:

- name: Configure docker source IP propagation
  # https://docs.docker.com/engine/security/rootless/#docker-run--p-does-not-propagate-source-ip-addresses
  community.general.ini_file:
    path: ~/.config/systemd/user/docker.service.d/override.conf
    section: Service
    option: Environment
    values:
      - '"DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns"'
      - '"DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns"'
    state: present
  become: true
  become_user: "{{ docker_user }}"
  notify: docker_service_restart

Would you be interested in a pull request extending the role with this functionality? We could introduce a var for the port driver, the default being builtin as is now but also providing slirp4netns and perhaps pasta.

If so I'd be willing to make this contribution.

@konstruktoid
Copy link
Owner

That sounds like a really good idea, @msladek feel free to create that PR

@msladek
Copy link
Contributor Author

msladek commented Aug 9, 2024

Sure, gonna open a PR next week.

@msladek
Copy link
Contributor Author

msladek commented Aug 14, 2024

#432 merged

@msladek msladek closed this as completed Aug 14, 2024
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