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

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

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

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

Comments

@ajnavarro
Copy link

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/main.py", line 71, in main
    command()
  File "/snap/docker/384/lib/python2.7/site-packages/compose/cli/main.py", line 124, in perform_command
    project = project_from_options('.', options)
  File "/snap/docker/384/lib/python2.7/site-packages/compose/cli/command.py", line 26, in project_from_options
    environment = Environment.from_env_file(project_dir)
  File "/snap/docker/384/lib/python2.7/site-packages/compose/config/environment.py", line 61, in from_env_file
    instance = _initialize()
  File "/snap/docker/384/lib/python2.7/site-packages/compose/config/environment.py", line 57, in _initialize
    return cls(env_vars_from_file(env_file_path))
  File "/snap/docker/384/lib/python2.7/site-packages/compose/config/environment.py", line 35, in env_vars_from_file
    with contextlib.closing(codecs.open(filename, 'r', 'utf-8-sig')) as fileobj:
  File "/snap/docker/384/usr/lib/python2.7/codecs.py", line 896, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: u'./.env'
exit status 1
@r0mainK
Copy link

r0mainK commented Jun 27, 2019

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

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(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
@carlosms
Copy link
Contributor

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.

@dpordomingo
Copy link
Contributor

Totally agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants