-
Notifications
You must be signed in to change notification settings - Fork 560
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
Failed to get D-Bus connection: Operation not permitted #45
Comments
I ran across this when trying to solve a similar DBUS problem Hope it helps |
@Treverix I am having the same problem. Have you solved this? Thanks. |
Not sure but most instructions about centos and systemd in docker out outdated. See this for current working instructions: I don't think you can run services via systemd in a docker build. Special privileges are needed. You can only enable / disable services, e.g.: If you need to run apache during the build maybe you could instead run it in foreground: If you need your container startup CMD to run a bash script before starting systemd init (e.g. to do some configuration based on env variables), that works if the script ends by calling |
I'm having the same problem, on OSX 10.11.6 (El Capitan). Docker version 1.11.1, build 5604cbe. My app is trying to start up Postgres 9.5. Running: docker run -i -t \
--privileged \
-p 80:3000 \
--cap-add SYS_ADMIN \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
--dns 4.4.4.4 --dns 8.8.4.4 \
-e NODE_ENV="${NODE_ENV}" \
tmarshall/latest bash; My Dockerfile builds off of the same given in https://hub.docker.com/_/centos/ (see "Dockerfile for systemd base image"). There was also an older thread that mentioned a fix for Ubuntu users, which I tried to apply to OSX, via No matter what, I always get
|
^ I got it to work by referring to @zokeber's repo, docker-postgresql |
I can run docker run --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d centos:7 /sbin/init More references: |
please refer |
When trying to build an image based on this Dockerfile:
the last step fails:
The lines below the systemd comment have been copied from the docs today (see reference in the comment)
The text was updated successfully, but these errors were encountered: