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

#57 Pass through UID and GID from host

parent 9936908b
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ function startContainer {
else
docker run --name ${COMPOSE_PROJECT_NAME}_l3d -dt \
--hostname ${COMPOSE_PROJECT_NAME}-l3d \
--user $(id -u):$(id -g) \
--user ${USERID}:${GROUPID} \
--env L3DSHELL=${L3DSHELL} \
--env COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME} \
--env COMPOSER_DOWNGRADE=${COMPOSER_DOWNGRADE} \
......
......@@ -49,7 +49,11 @@ fi
if [[ -f ".env" ]]; then
export $(cat .env | xargs) > /dev/null 2>&1
fi
export USERID=$(id -u)
export GROUPID=$(id -g)
docker exec -it \
--env USERID=${USERID} \
--env GROUPID=${GROUPID} \
--env HOMEDIR=${HOME} \
--env L3DSHELL=${L3DSHELL} \
--env WORKDIR=${PWD} \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment