Giter VIP home page Giter VIP logo

Comments (7)

jalogut avatar jalogut commented on May 30, 2024

Hi @TonySma

I guess you are on Linux, right? Because I did not face this problem on Mac. I think the problem comes from the php entrypoint here:

During the spin up of containers we need to ensure that user app owns the project files. This user has id 1000 inside images and is the user used by nginx and phpfpm. In Mac there is no problem with that because of a virtualization layer that separates host and container, so permission are not changed in the host. I see now that it doesnt seem to be same in Linux. It seems that if permissions change inside containers it also affects your host permissions. You are seeing 1000` because you might not have any user with this uid.

To be honest I am not sure if there is a way to avoid that in linux with some docker configuration or if that is normal. I would try to get some more info about that. Until then, I would also appreciate if you could also help us to find a solution for that ;)

from magento2-dockergento.

ihor-sviziev avatar ihor-sviziev commented on May 30, 2024

@jalogut as example for Linux we could use different image without changing permissions

from magento2-dockergento.

jalogut avatar jalogut commented on May 30, 2024

@ihor-sviziev well the idea is to use same images for all environments. Anyway, permisions need to be changed in Linux too because containers files need to be owned by app user. If we do not change them, nginx and php services could not read/write files when executing the project.

from magento2-dockergento.

ihor-sviziev avatar ihor-sviziev commented on May 30, 2024

Not sure if it will be easy to add support for different user IDs, probably we can add it as "limitations" in readme file

from magento2-dockergento.

TonySma avatar TonySma commented on May 30, 2024

Hi!

Maybe we can try to do the matching between uids & guid with a script when container is started.
I will look at this.

Tony

from magento2-dockergento.

jalogut avatar jalogut commented on May 30, 2024

Hi @TonySma and @ihor-sviziev

I just created PR #40 to match uid and gid on host when the containers start.

Until it gets merged, we would appreciate if you could checkout the branch fix-perms and test it on your computers?

You only need to execute dockergento start. Then the script checks the uids and correct them if they are not matching.

Thanks

from magento2-dockergento.

danielozano avatar danielozano commented on May 30, 2024

I'm closing this issue, it should be solved since #40 was merged.

from magento2-dockergento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.