Compare commits
No commits in common. "c27753da863b3c44ceb81b2fe6ac689550704f89" and "5596e5d36ff4f710877a0cdf94676a4f5a4efce0" have entirely different histories.
c27753da86
...
5596e5d36f
@ -1,9 +0,0 @@
|
||||
# Original by https://github.com/sleeepyjack/dockersh
|
||||
# Modified by georg@lysergic.dev
|
||||
# Note! This is a skeleton, it is being altered by the spawn process.
|
||||
FROM lc-archlinux-userbase-v2:sh0
|
||||
|
||||
COPY user-mapping.sh /
|
||||
RUN chmod u+x /user-mapping.sh
|
||||
|
||||
ENTRYPOINT ["/user-mapping.sh"]
|
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user