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
0d4571b3
Commit
0d4571b3
authored
4 years ago
by
Felix Häberle
Browse files
Options
Downloads
Patches
Plain Diff
#62
restructure code
parent
95cca74d
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
+7
-6
7 additions, 6 deletions
run/scripts/start
setup/scripts/l3d
+13
-16
13 additions, 16 deletions
setup/scripts/l3d
with
20 additions
and
22 deletions
run/scripts/start
+
7
−
6
View file @
0d4571b3
...
...
@@ -45,18 +45,19 @@ function startContainer {
--env
SSH_AUTH_SOCK
=
${
SSHAUTHSOCK
}
\
--volume
/var/run/docker.sock:/var/run/docker.sock
\
--volume
${
WORKDIR
}
:/drupal
\
--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
\
--volume
${
SSHAUTH
}
:
${
SSHAUTHSOCK
}
\
--volume
${
HOMEDIR
}
:
${
HOMEDIR
}
\
--workdir
/drupal
\
--restart
unless-stopped
\
)
if
[[
${
L3DHOSTOS
}
!=
Darwin
]]
;
then
start_params+
=(
--user
${
USERID
}
:
${
GROUPID
}
)
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
\
"
${
start_params
[@]
}
"
\
...
...
This diff is collapsed.
Click to expand it.
setup/scripts/l3d
+
13
−
16
View file @
0d4571b3
...
...
@@ -34,26 +34,23 @@ fi
touch
${
HOME
}
/.gitconfig
touch
${
HOME
}
/.gitignore_global
# l3d container
ID
=
$(
docker container
ls
--all
-q
-f
name
=
^l3drun
$)
# Create l3drun container parameters
l3drun_params
=(
--env
L3DHOSTOS
=
${
L3DHOSTOS
}
\
--env
SCRIPTPATH
=
${
SCRIPTPATH
}
\
--volume
/var/run/docker.sock:/var/run/docker.sock
\
--volume
${
SCRIPTPATH
}
:/setup
\
--volume
${
HOME
}
/.traefik:/root/.traefik
\
)
if
[[
${
L3DHOSTOS
}
==
Darwin
]]
;
then
l3drun_params+
=(
--env
SSH_AUTH_SOCK
=
${
SSHAUTHMAGICPATH
}
\
--volume
${
SSHAUTHMAGICPATH
}
:
${
SSHAUTHMAGICPATH
}
\
)
fi
# Execute l3drun container
if
[[
!
-n
${
ID
}
]]
;
then
# Create l3drun container parameters
l3drun_params
=(
--env
L3DHOSTOS
=
${
L3DHOSTOS
}
\
--env
SCRIPTPATH
=
${
SCRIPTPATH
}
\
--volume
/var/run/docker.sock:/var/run/docker.sock
\
--volume
${
SCRIPTPATH
}
:/setup
\
--volume
${
HOME
}
/.traefik:/root/.traefik
\
)
if
[[
${
L3DHOSTOS
}
==
Darwin
]]
;
then
l3drun_params+
=(
--volume
${
SSHAUTHMAGICPATH
}
:
${
SSHAUTHMAGICPATH
}
)
fi
# Execute l3drun container
docker run
--name
=
l3drun
-dt
--rm
\
"
${
l3drun_params
[@]
}
"
\
registry.lakedrops.com/docker/l3d/run:v1.8.2-mac0.
3
registry.lakedrops.com/docker/l3d/run:v1.8.2-mac0.
4
fi
# Set l3d shell
...
...
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