Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LakeDropsDrupalDev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker
LakeDropsDrupalDev
Commits
55b9ce98
Commit
55b9ce98
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Plan B: stay with user root on Mac
parent
5b97df6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Feature/macos
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
run/scripts/start
+7
-6
7 additions, 6 deletions
run/scripts/start
setup/scripts/l3d
+5
-3
5 additions, 3 deletions
setup/scripts/l3d
with
12 additions
and
9 deletions
run/scripts/start
+
7
−
6
View file @
55b9ce98
...
@@ -38,8 +38,6 @@ function startContainer {
...
@@ -38,8 +38,6 @@ function startContainer {
else
else
start_params
=(
start_params
=(
--hostname
${
COMPOSE_PROJECT_NAME
}
-l3d
--hostname
${
COMPOSE_PROJECT_NAME
}
-l3d
--user
${
USERID
}
:
${
GROUPID
}
--group-add
${
GROUPIDS
// / --group-add
}
--env
L3DVERSION
=
${
L3DVERSION
}
--env
L3DVERSION
=
${
L3DVERSION
}
--env
L3DSHELL
=
${
L3DSHELL
}
--env
L3DSHELL
=
${
L3DSHELL
}
--env
HOME
=
/home/
${
USERNAME
}
--env
HOME
=
/home/
${
USERNAME
}
...
@@ -56,16 +54,19 @@ function startContainer {
...
@@ -56,16 +54,19 @@ function startContainer {
)
)
if
[[
${
L3DHOSTOS
}
!=
Darwin
]]
;
then
if
[[
${
L3DHOSTOS
}
!=
Darwin
]]
;
then
start_params+
=(
start_params+
=(
--user
${
USERID
}
:
${
GROUPID
}
--group-add
${
GROUPIDS
// / --group-add
}
--volume
/etc/group:/etc/group:ro
--volume
/etc/group:/etc/group:ro
--volume
/etc/passwd:/etc/passwd:ro
--volume
/etc/passwd:/etc/passwd:ro
--volume
/etc/shadow:/etc/shadow:ro
--volume
/etc/shadow:/etc/shadow:ro
--volume
/etc/sudoers:/etc/sudoers:ro
--volume
/etc/sudoers:/etc/sudoers:ro
--volume
/etc/sudoers.d:/etc/sudoers.d:ro
--volume
/etc/sudoers.d:/etc/sudoers.d:ro
)
)
else
# else
start_params+
=(
# (see #62) Disabled for now.
--volume
${
HOMEDIR
}
/.passwd:/etc/passwd:ro
#start_params+=(
)
# --volume ${HOMEDIR}/.passwd:/etc/passwd:ro
#)
fi
fi
docker run
--name
${
COMPOSE_PROJECT_NAME
}
_l3d
-dt
\
docker run
--name
${
COMPOSE_PROJECT_NAME
}
_l3d
-dt
\
"
${
start_params
[@]
}
"
\
"
${
start_params
[@]
}
"
\
...
...
This diff is collapsed.
Click to expand it.
setup/scripts/l3d
+
5
−
3
View file @
55b9ce98
...
@@ -17,11 +17,13 @@ case "${L3DHOSTOS}" in
...
@@ -17,11 +17,13 @@ case "${L3DHOSTOS}" in
else
else
# This works on MacOS when coreutils is installed.
# This works on MacOS when coreutils is installed.
SCRIPTPATH
=
"
$(
dirname
"
$(
greadlink
-f
"
$0
"
)
"
)
"
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
fi
GROUPID
=
1
GROUPID
=
1
# Write a fake passwd file which will later be mounted into containers.
# (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
# echo "${USERNAME}:x:${USERID}:${GROUPID}:${USERNAME},,,:/home/${USERNAME}:${L3DSHELL}" >${HOME}/.passwd
USERNAME
=
root
# This variable is used to access the ssh agent on MacOS.
# This variable is used to access the ssh agent on MacOS.
SSHAUTHMAGICPATH
=
"/run/host-services/ssh-auth.sock"
SSHAUTHMAGICPATH
=
"/run/host-services/ssh-auth.sock"
SSHAUTH
=
${
SSHAUTHMAGICPATH
}
SSHAUTH
=
${
SSHAUTHMAGICPATH
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment