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

getting 'Could not find the requested service docker: host' #42

Closed
developerinlondon opened this issue Dec 19, 2017 · 2 comments
Closed

Comments

@developerinlondon
Copy link

It seems that we are looking for a docker service that is nonexistant.

I am testing this in a docker container 'centos:7'. so it fails on line /geerlingguy.docker/tasks/main.yml:11

any ideas? Docker in Docker should not cause issues right?

@JCorson
Copy link

JCorson commented May 16, 2018

Possibly related to ansible/ansible#36585?

@geerlingguy
Copy link
Owner

I haven't seen this issue in any of my builds, but if I'm running docker in docker, I use my own Docker images which have an entire setup around systemd running inside the container to make the container more like a typical/traditional VM.

I'm guessing the centos:7 Docker image doesn't ship with a full fledged systemd setup, because that's not the typical Docker way of doing things.

But this would definitely be something to approach upstream as it's not something this role can fix, since it relies on the service module.

However, if you're using this role to install Docker inside a Docker container, it's best to not try starting Docker as part of the role setup... and to that end, I'm going to set the service state to a variable (https://github.com/geerlingguy/ansible-role-docker/blob/master/tasks/main.yml#L17).

kakawait added a commit to kakawait/ansible-role-docker that referenced this issue Jun 5, 2018
* upstream/master: (23 commits)
  Fixes geerlingguy#42: Allow control over docker_service state.
  Update docker-compose version to 1.21.2
  Fix deprecation warning
  PR geerlingguy#26 follow-up: Docs tidy.
  PR geerlingguy#43 follow-up: Align order of vars in docs with defaults.
  Docker repo doesn't yet support Ubuntu 18.04 Bionic, it seems.
  PR geerlingguy#47 follow-up: Add tests for Ubuntu 18.04 Bionic, Fedora 27, and fix boolean case.
  Fixes geerlingguy#21: DOCKER iptables chain problem when used with geerlingguy.firewall.
  Issue geerlingguy#54: Update Docker Compose default version to the latest version. For real this time.
  Issue geerlingguy#54: Update Docker Compose default version to the latest version.
  Make ignoring repository key error optional
  Support fedora
  Changed 'include' to 'include_tasks' due to deprecations in Ansible >2.4
  Introduced CPU architecture switch for apt source definition
  'include' for tasks has been deprecated
  Update documentation
  Bump docker_compose_version to 1.16.1.
  Change include_task to depreciated include due to what looks like incompatibility with test harness
  Fix docker group to append group rather than set it
  Fix typo
  ...
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

3 participants