Skip to content
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

Systemd Enabled Centos image does not work with Packer on TravisCI #176

Open
egeexyz opened this issue Apr 11, 2018 · 1 comment
Open

Systemd Enabled Centos image does not work with Packer on TravisCI #176

egeexyz opened this issue Apr 11, 2018 · 1 comment

Comments

@egeexyz
Copy link

egeexyz commented Apr 11, 2018

Not exactly sure if this is a Centos, Packer, or TravisCI issue, but I figured I'd start here.

Summary:
Despite following the steps to enable systemd in Centos provided by the Centos image page on DockerHub, and also using the pre-enabled systemd image, the "Failed to get D-Bus connection: Operation not permitted" error message is returned.

Use Case:
I use Packer & Docker to test my Ansible roles and playbooks on TravisCI. This is the first time I've had to use Centos for them and my roles require certain Systemd units to be enabled. Needless to say, Systemd must be active for this to work.

According to this page, the only requirement besides referencing the correct image is to tell Packer to build the image in privileged mode, which I am doing:

"builders":[
    {
        "type": "docker",
        "name": "docker",
        "image": "centos/systemd",
        "privileged": "true",
        "discard": "true"
    }
]

I've also tried building the Docker image by hand, using the instructions provided by the DockerHub page. The Docker image that yielded also results in a failure.

@egeexyz
Copy link
Author

egeexyz commented Apr 11, 2018

Here's an example of running Docker in TravisCI with privileged mode on the Centos container with systemd enabled - https://travis-ci.org/egee-irl/devops_challenge/builds/365103605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant