docker-compose cannot connect to docker socket


Well-Known Member

Reaction score: 20
Messages: 259


I have a problem to connect to docker by docker-compose.
Has anybody similar problem? Thank you in advance.

user@freebsd:/docker-compose % l /var/run/docker.sock
228103 srw-rw-rw- 1 root wheel uarch 0B Feb 13 09:40:29 2018 /var/run/docker.sock
user@freebsd:/docker-compose % sudo docker-compose up -d
/usr/local/lib/python2.7/site-packages/docker/api/ UserWarning: The minimum API version supported is 1.21, but you are using version 1.19. It is recommended you either upgrade Docker Engine or use an older version of Docker SDK for Python.
'Python.'.format(MINIMUM_DOCKER_API_VERSION, self._version)
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.


Well-Known Member

Reaction score: 20
Messages: 259

Yes but nothing works. What I read, it's a problem with docker-compose on FreeBSD.
And I don't want to make any workarounds like this.

If someone has experience with docker-compose on FreeBSD I'll be apprieciated to any help.
Otherwise I have to drop using docker and docker-compose on FreeBSD.


Son of Beastie

Reaction score: 1,198
Messages: 3,176

That would be a good thing. Use jails instead. It's a FreeBSD thing and much better put together.


Active Member

Reaction score: 73
Messages: 177

Docker is not an officially supported technology on FreeBSD and it will probably never be. The client tools may work if you can compile them from a current source but to use them, you will have run at least a virtualized Linux installation somewhere (or locally in bhyve). I heard of people who had success with that. Personally, I wouldn't use Docker unless I was forced to.