Getting error when trying to run `docker-compose` on Ubuntu 16.04
geerlingguy opened this issue · 7 comments
geerlingguy commented
One a fresh Ubuntu 16.04 VM, after installing Docker via this role (with all defaults), I'm getting:
$ docker-compose up
ERROR: Dependency conflict: an older version of the 'docker-py' package is polluting the namespace. Run the following command to remedy the issue:
pip uninstall docker docker-py; pip install docker
geerlingguy commented
See related issue in the SaltStack queue: saltstack/salt#39216
geerlingguy commented
And as an aside, simply running sudo pip uninstall docker docker-py; sudo pip install docker
(or running as root user instead of using sudo
) fixes the problem—afterwards, docker-compose up
(as long as your user is in the docker
group!) works correctly.
geerlingguy commented
I just noticed the pip_install_docker_py
variable... that might be all I need.
martypitt commented
Confirmed, this worked for me:
-
hosts: all
remote_user: vagrant
sudo: true
roles:
- role: angstwad.docker_ubuntu
docker_group_members: [ "{{ remote_user }}" ]
pip_install_docker_py: false
vagrant@vagrant-ubuntu-trusty-64:~$ docker-compose --version
docker-compose version 1.11.0, build 6de1806
vagrant@vagrant-ubuntu-trusty-64:~$ docker --version
Docker version 1.13.1, build 092cba3
angstwad commented
So based on your experience here, should I default to not installing docker-py
on 16.04?
geerlingguy commented
@angstwad - Yeah, that looks to be the fix!