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
33506700
Commit
33506700
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Properly mount the user home directory
Also mount the passwd'ish files into the container
parent
6fc4670f
No related branches found
No related tags found
1 merge request
!1
Feature/macos
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
run/scripts/start
+6
-6
6 additions, 6 deletions
run/scripts/start
setup/scripts/l3d
+5
-7
5 additions, 7 deletions
setup/scripts/l3d
with
11 additions
and
13 deletions
run/scripts/start
+
6
−
6
View file @
33506700
...
...
@@ -47,18 +47,18 @@ function startContainer {
--volume
/var/run/docker.sock:/var/run/docker.sock
--volume
${
WORKDIR
}
:/drupal
--volume
${
SSHAUTH
}
:
${
SSHAUTHSOCK
}
--volume
${
HOMEDIR
}
:
${
HOMEDIR
}
--volume
${
HOMEDIR
}
:/home/
${
USERNAME
}
--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
--workdir
/drupal
--restart
unless-stopped
)
if
[[
${
L3DHOSTOS
}
!=
Darwin
]]
;
then
start_params+
=(
--user
${
USERID
}
:
${
GROUPID
}
--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
)
fi
docker run
--name
${
COMPOSE_PROJECT_NAME
}
_l3d
-dt
\
...
...
This diff is collapsed.
Click to expand it.
setup/scripts/l3d
+
5
−
7
View file @
33506700
...
...
@@ -14,7 +14,7 @@ case "${L3DHOSTOS}" in
SCRIPTPATH
=
"
$(
dirname
"
$(
greadlink
-f
"
$0
"
)
"
)
"
fi
# 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
}
SSHAUTHSOCK
=
${
SSHAUTHMAGICPATH
}
if
[[
$?
>
0
]]
;
then
...
...
@@ -71,9 +71,13 @@ fi
# Create project container parameters
export
USERID
=
$(
id
-u
)
export
USERNAME
=
${
USER
}
export
GROUPID
=
$(
id
-g
)
export
GROUPIDS
=
$(
id
-G
)
project_params
=(
--env
USERID
=
${
USERID
}
--env
USERNAME
=
${
USERNAME
}
--env
GROUPID
=
${
GROUPID
}
--env
GROUPIDS
=
"
${
GROUPIDS
}
"
--env
HOMEDIR
=
${
HOME
}
--env
L3DSHELL
=
${
L3DSHELL
}
...
...
@@ -84,12 +88,6 @@ project_params=(
--env
COMPOSE_PROJECT_NAME
=
${
COMPOSE_PROJECT_NAME
}
--env
COMPOSER_DOWNGRADE
=
${
COMPOSER_DOWNGRADE
}
)
if
[[
${
L3DHOSTOS
}
!=
Darwin
]]
;
then
project_params+
=(
--env
USERID
=
${
USERID
}
--env
GROUPID
=
${
GROUPID
}
)
fi
# Execute project container
docker
exec
-it
\
...
...
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