Bug 1017286

Summary: Unable to start any services or even list services using systemctl inside Fedora container
Product: [Fedora] Fedora Reporter: Dave Lawrence <dkl>
Component: docker-ioAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 19CC: jkeck, lsm5, mattdm, mgoldman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-09 16:07:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Lawrence 2013-10-09 14:58:19 UTC
Description of problem:

[dkl@localhost ~]$ cat /etc/redhat-release 
Fedora release 19 (Schrödinger’s Cat)

[dkl@localhost ~]$ rpm -q docker-io
docker-io-0.6.3-2.devicemapper.fc19.x86_64

[dkl@localhost ~]$ docker run -t -i mattdm/fedora /bin/bash
bash-4.2# yum -y install mysql-server
[...]
Complete!

bash-4.2# systemctl start mysqld.service
Failed to get D-Bus connection: No connection to service manager.

I cannot even list the services available:

bash-4.2# systemctl list-units               
Failed to get D-Bus connection: No connection to service manager.

Let me know if I can provide more detailed information.

dkl

Comment 1 Matthew Miller 2013-10-09 16:07:25 UTC
This is to be expected when entering the container that way.

You are essentially running bash in "single user mode" in the container. What you want to do instead is prepare a container with mysqld installed and then run _that_ rather than /bin/bash. (I suggest making a Dockerfile which uses mattdm/fedora as the base and adds mysqld.)

Or, if you want to start a container as a whole mini-OS, you could run systemd inside the container. This is not well-tested and may completely fail. (But eventually we want that working.)

I'm going to close this as NOTABUG, which can sound a little harsh -- I don't mean it that way. We can continue the conversation on the fedora-cloud mailing list (or basically any other forum, really). I'm excited to see people trying this out!