-
Notifications
You must be signed in to change notification settings - Fork 49
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
Access to host files in Linux #37
Comments
I see that in the first case you're using just the folder name, whereas in the other case you use the full path. Could it be that you're trying to create the folder in a folder where you don't have the access to? |
Hi, I used folder name because in spfx container we already have workdir altered: https://github.com/waldekmastykarz/docker-spfx/blob/master/Dockerfile#L8. Here's a cleaner test:
So yes, it could be some issues with permissions. Since it only appears in linux, I can draw a conclusion that it is related to permissions on the host directory. |
Is there a particular reason why you're trying to create the folder as the starting command in the container? |
yes, this is just a simple test that I came up with while investigated why creating a solution did not work in docker when I run it on Linux VM:
Same command in Docker Desktop works fine. |
This might be also relevant. Docker Desktop:
Docker Engine, docker-ce for Linux:
|
I have tested this approach with Windows and Linux hosts and it worked just fine for creating solutions: shurick81@4d5dcf9. Or should we look maybe why the permissions in Linux don't work when using "spfx" user? |
When you execute the |
Not sure if this is related or useful to anyone, but to run under Linux, I had to: I was unable to deploy with SSL, but that wasn't a requirement for my small demo anyways |
Hi, thanks for your experience @mzietlow! I can share my experience with using WSL2 in Windows. I did not have to create the npm-shrinkwrap.json file. What I had to do is only running this command in the project directory in WSL2 console:
|
I think we should conclude this behavior by design since when we mount a linux file system to a linux container, and the process in the container is working under 1001 identity, this identity should have appropriate permissions on the host file system. |
When I run this container in Linux, it throws error when trying to write to user hiles on the host, so I cannot also use spfx framework. However the same operation works in node:10.18.1 container:
Might it have something to do with the way we setup permissions in waldekm/spfx?
Linux machine is provisioned in Azure, from this image:
The text was updated successfully, but these errors were encountered: