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
7dc0fc86
Commit
7dc0fc86
authored
Jun 04, 2017
by
Gaetan Semet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logs to start.sh
Signed-off-by:
Gaetan Semet
<
gaetan@xeberon.net
>
parent
2689d1d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
base-notebook/start.sh
base-notebook/start.sh
+5
-0
No files found.
base-notebook/start.sh
View file @
7dc0fc86
...
@@ -8,11 +8,13 @@ set -e
...
@@ -8,11 +8,13 @@ set -e
if
[
$UID
==
0
]
;
then
if
[
$UID
==
0
]
;
then
# Change UID of NB_USER to NB_UID if it does not match
# Change UID of NB_USER to NB_UID if it does not match
if
[
"
$NB_UID
"
!=
$(
id
-u
$NB_USER
)
]
;
then
if
[
"
$NB_UID
"
!=
$(
id
-u
$NB_USER
)
]
;
then
echo
"Set user UID to:
$NB_UID
"
usermod
-u
$NB_UID
$NB_USER
usermod
-u
$NB_UID
$NB_USER
# Careful: $HOME might resolve to /root depending on how the
# Careful: $HOME might resolve to /root depending on how the
# container is started. Use the $NB_USER home path explicitly.
# container is started. Use the $NB_USER home path explicitly.
for
d
in
"
$CONDA_DIR
"
"
$JULIA_PKGDIR
"
"/home/
$NB_USER
"
;
do
for
d
in
"
$CONDA_DIR
"
"
$JULIA_PKGDIR
"
"/home/
$NB_USER
"
;
do
if
[[
!
-z
"
$d
"
&&
-d
"
$d
"
]]
;
then
if
[[
!
-z
"
$d
"
&&
-d
"
$d
"
]]
;
then
echo
"Set ownership to uid
$NB_UID
:
$d
"
chown
-R
$NB_UID
"
$d
"
chown
-R
$NB_UID
"
$d
"
fi
fi
done
done
...
@@ -20,6 +22,7 @@ if [ $UID == 0 ] ; then
...
@@ -20,6 +22,7 @@ if [ $UID == 0 ] ; then
# Change GID of NB_USER to NB_GID if NB_GID is passed as a parameter
# Change GID of NB_USER to NB_GID if NB_GID is passed as a parameter
if
[
"
$NB_GID
"
]
;
then
if
[
"
$NB_GID
"
]
;
then
echo
"Change GID to
$NB_GID
"
groupmod
-g
$NB_GID
-o
$(
id
-g
-n
$NB_USER
)
groupmod
-g
$NB_GID
-o
$(
id
-g
-n
$NB_USER
)
fi
fi
...
@@ -29,8 +32,10 @@ if [ $UID == 0 ] ; then
...
@@ -29,8 +32,10 @@ if [ $UID == 0 ] ; then
fi
fi
# Exec the command as NB_USER
# Exec the command as NB_USER
echo
"Execute the command as
$NB_USER
"
exec
su
$NB_USER
-c
"env PATH=
$PATH
$*
"
exec
su
$NB_USER
-c
"env PATH=
$PATH
$*
"
else
else
# Exec the command
# Exec the command
echo
"Execute the command"
exec
$*
exec
$*
fi
fi
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