mivp-agent / moos-ivp-agent

Model agnostic ML tooling for MOOS-IvP
https://mivp-agent.github.io/
MIT License
8 stars 3 forks source link

./docker.sh build error #15

Open En-lightener opened 5 months ago

En-lightener commented 5 months ago

Step 8/38 : RUN usermod -u $USER_ID moos ---> Running in 97e913ca6b0c usermod: UID '0' already exists The command '/bin/bash -c usermod -u $USER_ID moos' returned a non-zero code: 4

What is the problem and how to solve it

CarterFendley commented 5 months ago

Hi @En-lightener,

This is happening due to the docker configuration, admittedly it is not the best setup, but in order to have proper file permissions on Linux, I had to mirror the user's UID into the docker container which allowed for write access to the files copied inside the container. The script will detect your UID on your host machine (desktop / laptop / etc) and try to use that for the moos user in the docker container.

It looks like, when launching the docker container, you are logged in with a user which has a UID of zero. Because this is already used by the root user in the docker container, you are getting an error.

I would suggest trying to launch docker via a non-root user (one without UID of zero).

CarterFendley commented 5 months ago

I will mark this is a place for enhancement, it would be nice not to have this UID collision issue.