Skip to content
Snippets Groups Projects
Commit 55b9ce98 authored by jurgenhaas's avatar jurgenhaas
Browse files

Plan B: stay with user root on Mac

parent 5b97df6f
Branches
Tags
1 merge request!1Feature/macos
......@@ -38,8 +38,6 @@ function startContainer {
else
start_params=(
--hostname ${COMPOSE_PROJECT_NAME}-l3d
--user ${USERID}:${GROUPID}
--group-add ${GROUPIDS// / --group-add }
--env L3DVERSION=${L3DVERSION}
--env L3DSHELL=${L3DSHELL}
--env HOME=/home/${USERNAME}
......@@ -56,16 +54,19 @@ function startContainer {
)
if [[ ${L3DHOSTOS} != Darwin ]]; then
start_params+=(
--user ${USERID}:${GROUPID}
--group-add ${GROUPIDS// / --group-add }
--volume /etc/group:/etc/group:ro
--volume /etc/passwd:/etc/passwd:ro
--volume /etc/shadow:/etc/shadow:ro
--volume /etc/sudoers:/etc/sudoers:ro
--volume /etc/sudoers.d:/etc/sudoers.d:ro
)
else
start_params+=(
--volume ${HOMEDIR}/.passwd:/etc/passwd:ro
)
# else
# (see #62) Disabled for now.
#start_params+=(
# --volume ${HOMEDIR}/.passwd:/etc/passwd:ro
#)
fi
docker run --name ${COMPOSE_PROJECT_NAME}_l3d -dt \
"${start_params[@]}" \
......
......@@ -17,11 +17,13 @@ case "${L3DHOSTOS}" in
else
# This works on MacOS when coreutils is installed.
SCRIPTPATH="$(dirname "$(greadlink -f "$0")")"
L3DDOCKERHOST="$(dirname "$(greadlink -f "/var/run/docker.sock")")/docker.sock"
# (see #62) L3DDOCKERHOST="$(dirname "$(greadlink -f "/var/run/docker.sock")")/docker.sock"
fi
GROUPID=1
# Write a fake passwd file which will later be mounted into containers.
echo "${USERNAME}:x:${USERID}:${GROUPID}:${USERNAME},,,:/home/${USERNAME}:${L3DSHELL}" >${HOME}/.passwd
# (see #62) Write a fake passwd file which will later be mounted into containers.
# echo "${USERNAME}:x:${USERID}:${GROUPID}:${USERNAME},,,:/home/${USERNAME}:${L3DSHELL}" >${HOME}/.passwd
USERNAME=root
# This variable is used to access the ssh agent on MacOS.
SSHAUTHMAGICPATH="/run/host-services/ssh-auth.sock"
SSHAUTH=${SSHAUTHMAGICPATH}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment