OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

hi guys I don't know much about docker. Where does the SANDBOX USER ID come from?

Open ruanjianlun opened this issue 1 year ago • 1 comments

docker run
-it
--pull=always
-e SANDBOX_USER_ID=$(id -u)

ruanjianlun avatar May 16 '24 07:05 ruanjianlun

-e SANDBOX_USER_ID=$(id -u)

id -u the id from you host user id.

iFurySt avatar May 16 '24 09:05 iFurySt

-e SANDBOX_USER_ID=$(id -u)

id -u the id from you host user id.

-e SANDBOX_USER_ID=$(id -u)

id -u the id from you host user id.

-e SANDBOX_USER_ID=$(id -u)

id -u the id from you host user id.

the whole commend doesn't make any sense for me neither, i'm new to docker too, never use it before.

isweir avatar May 16 '24 22:05 isweir

SANDBOX_USER_ID is the user ID of the user that owns your workspace folder ( generally your user ), seeing in your sandbox is running in a docker image, if your ID didn't match then the files it created wouldn't be owned by you and the files you put in wouldn't be owned by it

tholum avatar May 17 '24 19:05 tholum

tholum has the correct answer here--it's to make sure file permissions stay nice.

rbren avatar May 18 '24 17:05 rbren