summaryrefslogtreecommitdiffstats
path: root/lcpubsh/image_template/user-mapping.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lcpubsh/image_template/user-mapping.sh')
-rw-r--r--lcpubsh/image_template/user-mapping.sh21
1 files changed, 0 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}"
-