Docker bitchin

31 May    docker, linux

Shifting from RedHat/CentOS environment to a more Debian based system (Ubuntu 16.04) for my work desktop recently, I encountered some weird issues with Docker.

Well, after the installation of docker and docker-compose, I kept getting some issues like the following whenever i would docker-compose -up

pirabarlen@thiruchendur:~$ docker-compose --verbose up
compose.config.config.find: Using configuration files: ./docker-compose.yml,./docker-compose.override.yml
docker.auth.find_config_file: Trying paths: ['/home/pirabarlen/.docker/config.json', '/home/pirabarlen/.dockercfg']
docker.auth.find_config_file: No config file found
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 68, in main
    command()
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 115, in perform_command
    project = project_from_options('.', options)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/command.py", line 37, in project_from_options
    override_dir=options.get('--project-directory'),
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/command.py", line 99, in get_project
    host=host, environment=environment
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/command.py", line 74, in get_client
    version_info = six.iteritems(client.version())
  File "/usr/local/lib/python2.7/dist-packages/docker/api/daemon.py", line 177, in version
    return self._result(self._get(url), json=True)
  File "/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py", line 47, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 183, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/home/pirabarlen/.local/lib/python2.7/site-packages/requests/sessions.py", line 480, in get
    return self.request('GET', url, **kwargs)
  File "/home/pirabarlen/.local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pirabarlen/.local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/home/pirabarlen/.local/lib/python2.7/site-packages/requests/adapters.py", line 426, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(13, 'Permission denied'))

 

Seems a permission issue.

 

The fix was to add myself to the docker group.

Note: Running docker-compose as sudo will ‘fix’ this too.THAT IS NOT good practice.

pirabarlen@thiruchendur:~$ sudo usermod -a -G docker pirabarlen

 

Then log out and log back in -_-‘

 

 

 

Cheers,

Pirabarlen

2 Comments

  1. to p zourer…la aussi pou posT comment bizin rempli captcha do matlo..mone blier maths table tou..aster li p dir limit exceeded tou lor captcha

  2. Debian bizin gagne zourE em. package la installer, mais li pa vraiment complet installation la. Moi ki bizin fer sa!

    Et dir ki zot fier de sa apt la.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.