Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
inkluster-dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
563f5806
authored
2025-01-20 13:14:30 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tweak order and reduce amount of volume mounts.
1 parent
6ff46cb3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
wrapper.sh
wrapper.sh
View file @
563f580
...
...
@@ -6,14 +6,20 @@ declare -a docker_args=(--rm -i)
[[
-t 0
]]
&&
docker_args+
=(
-t
)
docker_args+
=(
--network host
)
docker_args+
=(
-v /:/srv/host-root
)
docker_args+
=(
-w /srv/host-root/
$PWD
)
[[
$SSH_AUTH_SOCK
]]
&&
docker_args+
=(
-v
"
$SSH_AUTH_SOCK
:
$SSH_AUTH_SOCK
"
-e
"SSH_AUTH_SOCK=
$SSH_AUTH_SOCK
"
)
[[
$SSH_AUTH_SOCK
]]
&&
docker_args+
=(
-e
"SSH_AUTH_SOCK=/srv/host-root/
$SSH_AUTH_SOCK
"
)
network
=
if
[[
$KUBECONFIG
]]
;
then
docker_args+
=(
-v
"
$KUBECONFIG
:/srv/host-root/
$KUBECONFIG
"
-e
"KUBECONFIG=/srv/host-root/
$KUBECONFIG
"
)
elif
[[
$HOME
/.kube/config
]]
;
then
docker_args+
=(
-e
"KUBECONFIG=/srv/host-root/
$HOME
/.kube/config"
)
network
=
host
docker_args+
=(
-e
"KUBECONFIG=/srv/host-root/
$KUBECONFIG
"
)
elif
[[
-e
$HOME
/.kube/config
]]
;
then
network
=
host
docker_args+
=(
-v
"
$HOME
/.kube/config:/home/tool/.kube/config"
)
fi
if
[[
$network
]]
;
then
docker_args+
=(
--network host
)
fi
docker_args+
=(
-e
MAP_UID
=
"
$(
id -u
)
"
-e
MAP_GROUPS
=
"
$(
id -G
)
"
)
...
...
Please
register
or
sign in
to post a comment