Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
be4674ff
Commit
be4674ff
authored
Aug 09, 2019
by
Adrien Delsalle
Committed by
GitHub
Aug 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the way to change user uid/gid
Workaround of a Docker bad handling of sparse files Fixes #923
parent
66c99628
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
base-notebook/start.sh
base-notebook/start.sh
+5
-11
No files found.
base-notebook/start.sh
View file @
be4674ff
...
@@ -76,18 +76,12 @@ if [ $(id -u) == 0 ] ; then
...
@@ -76,18 +76,12 @@ if [ $(id -u) == 0 ] ; then
fi
fi
fi
fi
# Change UID of NB_USER to NB_UID if it does not match
# Change UID:GID of NB_USER to NB_UID:NB_GID if it does not match
if
[
"
$NB_UID
"
!=
$(
id
-u
$NB_USER
)
]
;
then
if
[
"
$NB_UID
"
!=
$(
id
-u
$NB_USER
)
]
||
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
echo
"Set
$NB_USER
UID to:
$NB_UID
"
echo
"Set user
$NB_USER
UID:GID to:
$NB_UID
:
$NB_GID
"
usermod
-u
$NB_UID
$NB_USER
userdel
$NB_USER
fi
# Set NB_USER primary gid to NB_GID (after making the group). Set
# supplementary gids to NB_GID and 100.
if
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
echo
"Add
$NB_USER
to group:
$NB_GID
"
groupadd
-g
$NB_GID
-o
${
NB_GROUP
:-${
NB_USER
}}
groupadd
-g
$NB_GID
-o
${
NB_GROUP
:-${
NB_USER
}}
user
mod
-g
$NB_GID
-aG
100
$NB_USER
user
add
--home
/home/
$USER
-u
$NB_UID
-g
$NB_GID
-G
100
-l
$NB_USER
fi
fi
# Enable sudo if requested
# Enable sudo if requested
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment