diff options
Diffstat (limited to 'lcpubsh/image_template')
-rw-r--r-- | lcpubsh/image_template/user-mapping.sh | 21 | ||||
l--------- | lcpubsh/image_template/user_mapping.sh | 1 |
2 files changed, 1 insertions, 21 deletions
diff --git a/lcpubsh/image_template/user-mapping.sh b/lcpubsh/image_template/user-mapping.sh deleted file mode 100644 index f2aa456..0000000 --- a/lcpubsh/image_template/user-mapping.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Original by https://github.com/sleeepyjack/dockersh -# Modified by georg@lysergic.dev -if [ -z "${HOST_USER_NAME}" -o -z "${HOST_USER_ID}" -o -z "${HOST_USER_GID}" ]; then - echo "HOST_USER_NAME, HOST_USER_ID & HOST_USER_GID needs to be set!"; exit 100 -fi - -useradd \ - --uid ${HOST_USER_ID} \ - --gid ${HOST_USER_GID} \ - --create-home \ - --shell /bin/bash \ - ${HOST_USER_NAME} -groupadd --gid "${HOST_USER_GID}" "${HOST_USER_NAME}" -usermod -aG sudo ${HOST_USER_NAME} -sleep 5s - -echo ${HOST_USER_NAME}:${HOST_USER_NAME} | chpasswd - -exec su - "${HOST_USER_NAME}" - diff --git a/lcpubsh/image_template/user_mapping.sh b/lcpubsh/image_template/user_mapping.sh new file mode 120000 index 0000000..e51feef --- /dev/null +++ b/lcpubsh/image_template/user_mapping.sh @@ -0,0 +1 @@ +../bin/user_mapping.sh
\ No newline at end of file |