Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
Kitchen-Docker and Systemd

I am currently using kitchen-docker driver for my test kitchen runs in order to speed up our automated cookbook tests.

However after playing for a while with this I found that every kitchen run fails if there is involved in any recipe a service resource, if I try to stop/start/restart a service, this is not allowed within the container and the run fails.

If I get inside the container using kitchen login, every time I try to use systemctl... I get this error message:

[kitchen@17c054a76e8f ~]$ sudo systemctl restart foo
Failed to get D-Bus connection: Operation not permitted

Is there any way to fix this? I am currently running this image with option privileged: true in .kitchen.yml.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As I didn't make the move to kitchen-dokken yet as well, here is the config that I use to enable systemd inside kitchen-docker:

driver:
  name: docker
  run_command: /bin/systemd
  cap_add:
    - SYS_ADMIN
  volume:
    - /sys/fs/cgroup

WARNING: I assume that you are familiar with the implications of giving a container SYS_ADMIN capabilities (root-equivalent on the host system, read more).

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!