0

I have a server with ubuntu 14.04 (that does not use systemd), I use HHVM but I want to use php 7 now. I was thinking, why not use a container with php7.0-fpm, this should work.

I first tried with a centos 7 (that uses systemd) container, I could install everything, but the problem is when I try to start the service, I get this: "Failed to get D-Bus connection: Operation not permitted"

In the end, I used an Ubuntu 14.04 container where I installed php7 with fpm and it worked, but will I get this problem every time I want to use am container that uses systemd from a system that doesn't? (and what about the opposite)

Thank you :)

Arvi89
  • 41
  • 8
  • Have you considered using the official php image? See: https://hub.docker.com/_/php/ – Mark O'Connor Feb 27 '16 at 12:29
  • Possible duplicate of [systemd and systemctl within Ubuntu Docker images](http://stackoverflow.com/questions/39169403/systemd-and-systemctl-within-ubuntu-docker-images) – BMitch Mar 23 '17 at 15:00

2 Answers2

1

Do you start the service with "system php start" or "systemctl start php"? Then may be you could get a benefit from using my https://github.com/gdraheim/docker-systemctl-replacement ... which will do it without a running systemd daemon.

Guido U. Draheim
  • 3,038
  • 1
  • 20
  • 19
0

Just look at https://gist.github.com/real666maverick/b7f73e39dad449e09d64c9a2baab6b37 for play with systemd, but memorize, you can't start container with working systemd without support of your OS, only on systemd native support linux distributives this receipt will be work.