NGEET / fates-containers

Repository for containerized version of fates for use in future tutorials
6 stars 7 forks source link

Move useradd command to fates-specific dockerfiles? #6

Closed glemieux closed 3 years ago

glemieux commented 4 years ago

While migrating the baseos files over to the ngeet repo I noted that the libraries and packages are installing to /usr/local/ and that the user name isn't strictly necessary for the baseos build. As such perhaps we should move the use of the useradd to the host land model specific builds of the fates image?

glemieux commented 4 years ago

Noting that the baseos files have had the useradd removed per #11, but hlm dockerfiles still need to be updated and migrated in.

glemieux commented 4 years ago

Do we actually need to have a specific user for the build process? On a related note, I think we should be using docker run --user $(id -u):$(id -g) call to make sure that when we volume mount the input and output files, the user and group ids are automatically handled as described here: https://vsupalov.com/docker-shared-permissions/

glemieux commented 3 years ago

Closed per #26. Note that cime needs a user environment variable, but does not need to be called from a /home/$USER directory. In fact, the Dockerfile should actually be built with the root user since passing --user $(id -u):$(id -g) will only match the calling user ids if the container base permission for the volume mounting targets is root.