Got error when install pymssql library in docker

hello
i got the below error when trying to install pymssql using docker file when build my image
I think it is related to security issue

Hi Tamer,

This is an OS permissions issue, so this is not the best forum to ask, but I’ll try to help.

Which user is this running as? root?

The reason I ask is the paths that permissions are being denied to are not normal (/.local and /.cache/pip) usually this would be prefixed with /home/<username> (e.g ./home/<username>/.local)

This makes me think that the users home directory is not set properly?

Hope that helps,

Dave.

when i run the same docker file using another docker image it pass , it only fail with browser library image so I think it relate to the image

Docs explicitly use pip install --user

i already used it but the same error still appear

@René your advice please

if the error is exactly the same, then you are missing USER in your own docker compose/dockerfile and root filesystem is read-only, eg, not to be used for adding your own software. As the doc highlights, things are supposed to go into USER’s /home/ aka ~/.local when doing pip installs.

1 Like

how can i know the user required for this image to add it to my docker file
https://hub.docker.com/r/marketsquare/robotframework-browser

i have found the solution to just add this line to the docker file
USER root
RUN pip install --no-cache-dir pymssql