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
c1015ddc
authored
2025-01-20 15:51:34 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Handle the group not being GID=1000.
1 parent
57446c0e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
entrypoint.sh
entrypoint.sh
View file @
c1015dd
...
...
@@ -6,7 +6,7 @@ tool_uid="$(id -u tool)"
tool_gid
=
"
$(
id -g tool
)
"
adjust_tool_uid_gid
()
{
declare
usermod_args
=()
declare
usermod_args
=()
groupmod_args
=()
declare
-a
new_groups
=()
if
[[
$MAP_UID
]]
;
then
...
...
@@ -14,7 +14,9 @@ adjust_tool_uid_gid() {
fi
if
[[
$MAP_GROUPS
]]
;
then
set
--
$MAP_GROUPS
[[
$(
id -g tool
)
-ne
$1
]]
&&
usermod_args+
=(
-g
$1
)
if
[[
$tool_gid
-ne
$1
]]
;
then
groupmod_args
=(
-g
"
$1
"
)
fi
shift
for
group
in
"
$@
"
;
do
groupadd -g
$group
-o tool_
$group
...
...
@@ -25,6 +27,9 @@ adjust_tool_uid_gid() {
usermod_args+
=(
-aG
"
${
new_groups
[*]
}
"
)
fi
fi
if
[[
${#
groupmod_args
[*]
}
-gt 0
]]
;
then
groupmod
"
${
groupmod_args
[@]
}
"
tool
fi
if
[[
${#
usermod_args
[*]
}
-gt 0
]]
;
then
usermod
"
${
usermod_args
[@]
}
"
tool
fi
...
...
Please
register
or
sign in
to post a comment