Skip to content

Conversation

@rckoepke
Copy link

@rckoepke rckoepke commented Dec 5, 2019

This PR was to fix lockup issue with RUN chown -R ${user_name}:${group_name} $HOME/anaconda3

That long pause is apparently normal, seems to clear up after ~30 minutes.

However, this is still a better build file due to its use of ${user_name}:${group_name} rather than hardcoded strings, so will complete pull request.

Hardcoding user and group ARGS into the shell commands fixed an issue I was having:

When passing ${user_name}:${group_name}, etc etc, the shell was reading all the args as "0" instead of 1000 etc. This caused the make to fail.

Step 8/27 : ARG group_id=1000
 ---> Using cache
 ---> 4e5b9a63b30e
Step 9/27 : RUN groupadd -g ${group_id} ${group_name}
 ---> Running in 30201b6ab1bb
groupadd: GID '0' already exists
The command '/bin/sh -c groupadd -g ${group_id} ${group_name}' returned a non-zero code: 4
Makefile:11: recipe for target 'docker-build' failed
make: *** [docker-build] Error 4

Step 8/27 : ARG group_id=1000
 ---> Using cache
 ---> 4e5b9a63b30e
Step 9/27 : RUN groupadd -g 1000 ubuntu
 ---> Running in 35d12c8401c4
Removing intermediate container 35d12c8401c4
 ---> 57185d9d33e8
Step 10/27 : RUN useradd -u ${user_id} -g ${group_id} -d /home/${user_name}     --create-home --shell /bin/bash ${user_name}
 ---> Running in 7d09306b8138
useradd: UID 0 is not unique
The command '/bin/sh -c useradd -u ${user_id} -g ${group_id} -d /home/${user_name}     --create-home --shell /bin/bash ${user_name}' returned a non-zero code: 4
Makefile:11: recipe for target 'docker-build' failed
make: *** [docker-build] Error 4
Seems to fix issue stalling at 

RUN chown -R ${user_name}:${group_name} $HOME/anaconda3

I strongly suspect the stalling/locking up is unrelated to these changes, however.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant