From e30df9fa9aa4e2c40bd3d733a5e7e2ed06358743 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Wed, 8 Jun 2022 19:24:17 +0000 Subject: [PATCH] Fix groupadd/useradd in `run_docker` so $HOME is set correctly (#2675) "$HOME is now just set to /. According to useradd's documentation, the flag for setting the home directory is just --home, not --home-dir. With that, echo $HOME gives the right result in the container." https://github.com/pyodide/pyodide/issues/2674#issuecomment-1150182865 --- run_docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_docker b/run_docker index 98bf2c61c..8ba729aa3 100755 --- a/run_docker +++ b/run_docker @@ -127,9 +127,9 @@ CONTAINER=$(\ --shm-size 2g \ "${PYODIDE_DOCKER_IMAGE}" \ /bin/bash -c " \ - groupadd '$USER_GID'; \ + groupadd --gid '$USER_GID' '$USER_NAME'; \ useradd \ - --home-dir '$USER_HOME' \ + --home '$USER_HOME' \ --uid '$USER_ID' \ --gid '$USER_GID' \ --comment '$USER_COMMENT_FIELD' \