Skip to content

Conversation

@illyaMs
Copy link
Contributor

@illyaMs illyaMs commented Apr 10, 2020

Problem:
On hosts running Ubuntu the default location for docker.service and docker.socket files is /lib/systemd/system. Under the hood the test suite currently tries to check for these files existence in other default location (/etc/systemd/system/), fails to do that an attempts to make a call to systemctl to get the actual one. This call always fails because systemctl is missing in the docker image (since it's based on alpine).

Suggested solution:

  1. Add the default Ubuntu location check for docker.service and docker.socket files (before the systemctl call)
  2. Rename the get_systemd_service_file file to get_service_file (since the old name seems to be not very relevant: systemd is actually used as a fallback with default location returned if it's in place).
  3. Update the exceptions section in Readme.md so that people using the docker image against Ubuntu hosts won't forget to add an extra /etc/systemd/system/ mount

Note:
I've also considered removing the systemd call with something more appropriate. but failed to find proper option (since the script should work not only in Alpine-based image but on other platform-specific images as well). So I'm really open to suggestions on that matter (left as is for now).

illyaMs added 2 commits April 10, 2020 16:26
…socket files

Signed-off-by: Ilya Dus <ilyadoos@gmail.com>
…for Ubuntu

Signed-off-by: Ilya Dus <ilyadoos@gmail.com>
@konstruktoid
Copy link
Collaborator

Thanks for the PR @illyaMs, I'll test verify as soon as possible.

@konstruktoid konstruktoid merged commit 2cdfa3d into docker:master Apr 15, 2020
@konstruktoid
Copy link
Collaborator

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants