I've installed a fresh Ubuntu 18.04, then docker from repos, then a few containers. Everything was doing fine.
I've then installed docker-composer from repos : docker is now dead, I can't start it, even after rebooting.
Output of "docker-compose version"
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.15rc1
OpenSSL version: OpenSSL 1.1.0g 2 Nov 2017
Output of "docker version"
Client:
Version: 17.12.1-ce
API version: 1.35
Go version: go1.10.1
Git commit: 7390fc6
Built: Wed Apr 18 01:23:11 2018
OS/Arch: linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Output of "docker-compose config"
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
# service docker start
Job for docker.socket failed.
See "systemctl status docker.socket" and "journalctl -xe" for details.
Failed to start docker.service: Unit docker.service is masked.
# systemctl status docker.socket
โ docker.socket - Docker Socket for the API
Loaded: loaded (/lib/systemd/system/docker.socket; enabled; vendor preset: enabled)
Active: inactive (dead)
Listen: /var/run/docker.sock (Stream)
Jul 20 17:38:33 ros systemd[1]: docker.socket: Socket service docker.service not loaded, refusing.
Jul 20 17:38:33 ros systemd[1]: Failed to listen on Docker Socket for the API.
Jul 20 21:05:53 ros systemd[1]: docker.socket: Socket service docker.service not loaded, refusing.
Jul 20 21:05:53 ros systemd[1]: Failed to listen on Docker Socket for the API.
Jul 20 21:16:08 ros systemd[1]: docker.socket: Socket service docker.service not loaded, refusing.
Jul 20 21:16:08 ros systemd[1]: Failed to listen on Docker Socket for the API.
Everything was done as root, so I don't think it's a permission problem.
I've done some googling but didn't find any solution.
Is there a way to get thing back online without re-installing everything?
Thanks
I removed completely docker and docker-compose, and re-installed only docker, still dead.
Did you install docker-compose from the Ubuntu repository? (ie, a version that's packaged by Ubuntu?)
I wonder if doing so also resulted in the Ubuntu packaged version of Docker to be installed (given that that would be a conflicting package, possibly that resulted in your existing version of Docker to be uninstalled)
Closing, but please update if you're still seeing issues. As @thaJeztah pointed out, distro packages can cause some problems - refer to our documentation for the supported install options: https://docs.docker.com/compose/install/
fwiw i just ran into this:
My theory atm:
docker-compose possibly maskes the docker.io systemd unit file (links it to /dev/null), purging docker.io and docker-compose does not remove this link. after reinstalling docker-compose, problem persists.
Solution:
once i did 'rm /etc/systemd/system/docker.service' i could manage the service via 'systemctl'
i'm not sure how this happens, it might be related to the still existing SysV init-files for the package, and how they get handled in conjunction with 18.04 and possibly 16.04
it's all pretty weird.
same thing with me too ,installed docker-compose and docker daemon wont start
@whysthatso Just ran into this issue, could you please describe the full solution step by step? Do I need to uninstall docker-compose and stuff and then reinstall docker or what?
@whysthatso Just ran into this issue, could you please describe the full solution step by step? Do I need to uninstall docker-compose and stuff and then reinstall docker or what?
as far as i remember:
or it could be:
but yeah, sorry, i realized i should have contextualized my comment a bit better
try both, can't really mess anything up here
@whysthatso Thanks, I actually solved it. The main point is to make sure to isntall Docker CE and Compose from appropriate repositories, not from distro's repos
I have same problem. Installing docker-compose killed running docker daemon. How sad there is no standard repo for Ubuntu for both docker and docker-compose. I found the following link that explains the two alternative universes for docker on Debian (docker.io vs docker-ce):
https://www.collabora.com/news-and-blog/blog/2018/07/04/docker-io-debian-package-back-to-life/
I lean toward installing docker-ce as opposed to docker.io, hence follow these two guides:
https://docs.docker.com/install/linux/docker-ce/ubuntu/ (includes uninstall docker.io package)
Most helpful comment
as far as i remember:
or it could be:
but yeah, sorry, i realized i should have contextualized my comment a bit better
try both, can't really mess anything up here