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

Error executing sourced init when docker is installed using snap #78

ajnavarro opened this issue Jun 21, 2019 · 3 comments · Fixed by #221


Copy link

commented Jun 21, 2019

This is the error:

./sourced init /home/antonio/bblfsh-org/
docker-compose working directory set to /home/antonio/.sourced/workdirs/home/antonio/bblfsh-org
Traceback (most recent call last):
  File "/snap/docker/384/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.22.0', 'console_scripts', 'docker-compose')()
  File "/snap/docker/384/lib/python2.7/site-packages/compose/cli/", line 71, in main
  File "/snap/docker/384/lib/python2.7/site-packages/compose/cli/", line 124, in perform_command
    project = project_from_options('.', options)
  File "/snap/docker/384/lib/python2.7/site-packages/compose/cli/", line 26, in project_from_options
    environment = Environment.from_env_file(project_dir)
  File "/snap/docker/384/lib/python2.7/site-packages/compose/config/", line 61, in from_env_file
    instance = _initialize()
  File "/snap/docker/384/lib/python2.7/site-packages/compose/config/", line 57, in _initialize
    return cls(env_vars_from_file(env_file_path))
  File "/snap/docker/384/lib/python2.7/site-packages/compose/config/", line 35, in env_vars_from_file
    with contextlib.closing(, 'r', 'utf-8-sig')) as fileobj:
  File "/snap/docker/384/usr/lib/python2.7/", line 896, in open
    file =, mode, buffering)
IOError: [Errno 13] Permission denied: u'./.env'
exit status 1

This comment has been minimized.

Copy link

commented Jun 27, 2019

Got the same error, but installing docker-compose by doing as instructed solved it for me:

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

@carlosms carlosms self-assigned this Aug 19, 2019


This comment has been minimized.

Copy link

commented Aug 19, 2019

After spending a very short time with this, I don't think it's worth to do anything on our side.
I tried to run sourced as root, and the same error happened. Running it with SOURCED_DIR outside of $HOME fails with a different error.

The Docker snap package is not maintained by docker, and on my machine it installs outdated versions of docker and docker-compose.

$ docker-compose -v
docker-compose version 1.22.0, build unknown
$ docker -v
Docker version 18.06.1-ce, build e68fc7a

I'll add a warning in the docs for this.

@carlosms carlosms referenced this issue Aug 19, 2019
1 of 2 tasks complete

This comment has been minimized.

Copy link

commented Aug 19, 2019

Totally agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.