Bug 1017286 - Unable to start any services or even list services using systemctl inside Fedora container
Summary: Unable to start any services or even list services using systemctl inside Fed...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: docker-io
Version: 19
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 14:58 UTC by Dave Lawrence
Modified: 2014-07-01 22:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-09 16:07:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.