Skip to content

Instantly share code, notes, and snippets.

@logicminds
Created November 21, 2019 22:31
Show Gist options
  • Save logicminds/0175afde8cac01ac89a26c7ba1aa385c to your computer and use it in GitHub Desktop.
Save logicminds/0175afde8cac01ac89a26c7ba1aa385c to your computer and use it in GitHub Desktop.
kitchen-docker config for systemd
---
# allows docker containers to run systemd for traditional CM acceptance testing.
# Note obviously systemd must be installed in the container
# this also is for unprivileged mode
# Requires a operating systemd installed RHEL7, CENTOS7, ... that supports systemd.
# https://developers.redhat.com/blog/2016/09/13/running-systemd-in-a-non-privileged-container/
driver:
name: docker
run_options:
tmpfs:
- /tmp
- /run
stop-signal: 'SIGRTMIN+3'
run_command: '/sbin/init'
volume:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
@logicminds
Copy link
Author

Podman supports this out of the box. Would be neat to see if kitchen-docker supports podman.

https://developers.redhat.com/blog/2019/04/24/how-to-run-systemd-in-a-container/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment