This message was deleted.
# rancher-desktop
a
This message was deleted.
b
Hi Marcos, I've never had that issue. Are you mounting the filesystem of the host to the container?
s
I don’t know if I understand your question, but in short, I have a file structure for my project that will be inside this folder... Unfortunately, a different user/group is being assigned as owner than the one I specified in my Dockerfile as shown above... Before with Docker Desktop I didn’t have this problem... Another member of my team is experiencing the same thing... I don’t know if this is something wrong on my part or if Rancher Desktop needs to be set something that Docker Desktop didn’t need…
b
how are you running the container? Are you mounting your codebase into it for development?
s
It’s for development, I only run:
docker-compose build
and
docker-compose up -d
I detected some error on log of my app trying write in a folder of project and I realized the owner of my files is not ROOT
b
and the docker-compose file - is it mounting your local codebase into the container?
👍 1
docker desktop on mac/windows has some filesystem magic that will translate UIDs when mounting. Native docker and Rancher desktop do not do that, so you'll have to wrangle UIDs between the local system and what the container process is running as
s
hMMMM as we need to do with VOLUMES: my-folder/files:inside-container/files ??
b
right, that is a bind mount.
one way to solve this is to run the container as the same UID as your local user UID
s
Can you showme an example how to do this?
b
you are already adding a user with uid 1500 in your Dockerfile. If you are building the container locally before running it, you can supply the UID of your local user instead of hardcoding 1500
Otherwise you can use an entrypoint script that will create the proper uid and assume it before starting the main container process
actually it looks like rancher desktop supports a config option to do this mapping https://github.com/rancher-sandbox/rancher-desktop/issues/1209#issuecomment-1370181132
b
I spaced out, but yes, what Mike said.
s
I’ll try this @bulky-computer-31499
q
Fwiw, in v1.9.0 you can select this from the GUI instead of manually
🙌 1