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

Open_basedir /.dockerenv problem #5

Closed
oli-ver opened this issue Dec 22, 2019 · 7 comments
Closed

Open_basedir /.dockerenv problem #5

oli-ver opened this issue Dec 22, 2019 · 7 comments

Comments

@oli-ver
Copy link
Contributor

oli-ver commented Dec 22, 2019

When trying to get my dev environment up and running again an error occured when running docker exec -it elabftw composer install:

[ErrorException]                                                                                                                            
  file_exists(): open_basedir restriction in effect. File(/.dockerenv) is not within the allowed path(s): (/elabftw/:/tmp/:/root/.composer:/  
  usr/bin/composer:/usr/bin/unzip)    

Adding /.dockerenv to the open_basedir path in php.ini seems to fix it.

@NicolasCARPi
Copy link
Contributor

Yes I realized that too some time ago, I used another approach:

1458d7b

Did you use this version (meaning this fix didn't work)?

@oli-ver
Copy link
Contributor Author

oli-ver commented Dec 22, 2019

I pulled elabftw/elabimg:latest which is 4 weeks old. Has you fix been published yet? As it is part of the master branch and tagged with a version I would assume so, right?

@NicolasCARPi
Copy link
Contributor

I think if you build it yourself you'll get the fix but the one from docker hub might not have it.

@oli-ver
Copy link
Contributor Author

oli-ver commented Dec 23, 2019

I just built the dev branch myself and are still reproducing the issue:

 [ErrorException]                                                                                                                                                       
  file_exists(): open_basedir restriction in effect. File(/.dockerenv) is not within the allowed path(s): (/elabftw/:/tmp/:/root/.composer:/usr/bin/composer:/usr/bin/u  
  nzip)  

I checked the commit history: Your fix has been merged to the dev branch but seems not to work (perhaps .dockerenv is being created during another step?). When testing with a docker image with the fixed open_basedir path it's working.

@NicolasCARPi
Copy link
Contributor

Ok I'll merge your change then. You can even add a commit on your PR to remove the rm .dockerenv from the Dockerfile ;)

oli-ver added a commit to oli-ver/elabimg that referenced this issue Dec 28, 2019
Removed 'rm .Dockerfile' as it is now covered by open_basedir declaration
@oli-ver
Copy link
Contributor Author

oli-ver commented Dec 28, 2019

@NicolasCARPi Sure, I updated the branch with your suggestion

@oli-ver
Copy link
Contributor Author

oli-ver commented Dec 28, 2019

@NicolasCARPi Sorry, I got confused with the branches. My commit was not on the patch-2 branch but on the dev branch in my fork. Is it possible that my pull request needs to be set to the dev branch, too? Right now it's for hypernext. I will push the change to the patch-2 branch now.

oli-ver added a commit to oli-ver/elabimg that referenced this issue Dec 28, 2019
NicolasCARPi added a commit that referenced this issue Jan 7, 2020
* hypernext:
  Review tasks from #5
  Fix missing .dockerenv entry in open_basedir
NicolasCARPi added a commit that referenced this issue Feb 14, 2020
* hypernext:
  add --prefer-dist --no-progress --no-suggest to composer install command
  Review tasks from #5
  add delete method
  Fix missing .dockerenv entry in open_basedir
  add gzip compression for javascript and css
  changelog for 1.4.0
  improve disable_function sed
  add php7-exif
NicolasCARPi added a commit that referenced this issue Feb 22, 2020
* hypernext:
  add --prefer-dist --no-progress --no-suggest to composer install command
  Review tasks from #5
  add delete method
  Fix missing .dockerenv entry in open_basedir
  add gzip compression for javascript and css
  changelog for 1.4.0
  improve disable_function sed
  add php7-exif
NicolasCARPi added a commit that referenced this issue Mar 25, 2020
* hypernext:
  add --prefer-dist --no-progress --no-suggest to composer install command
  Review tasks from #5
  add delete method
  Fix missing .dockerenv entry in open_basedir
  add gzip compression for javascript and css
  changelog for 1.4.0
  improve disable_function sed
  add php7-exif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants