-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lock lab version to 3.6.3 and wait for extension updates * allow homes other than /home/jovyan with gid=0 * git lfs. see #25 * add env support for other code-server userdata dirs * change default config of python extension + user path changes. * vscode update * update base images * fix prolog install * add util image with extended cappabilities * add opencv
- Loading branch information
1 parent
fd958dc
commit 399fe69
Showing
7 changed files
with
136 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# works for command: docker run --user 5000:100 --group-add root --group-add 1000 -e NB_USER="myuser" ... | ||
if [[ -w /etc/passwd ]] && [[ -w /home ]]; then | ||
if [[ "${NB_USER}" != "jovyan" ]]; then | ||
_log "creating enw home for user ${NB_USER}" | ||
mkdir -p /home/${NB_USER}; | ||
head -n -1 /etc/passwd > /tmp/passwd; | ||
echo "creating passwd entry ${NB_USER}:x:$(id -u):$(id -g):,,,:/home/${NB_USER}:/bin/bash"; | ||
echo "${NB_USER}:x:$(id -u):$(id -g):,,,:/home/${NB_USER}:/bin/bash" >> /tmp/passwd; | ||
cat /tmp/passwd > /etc/passwd; | ||
rm /tmp/passwd; | ||
export HOME=/home/${NB_USER}; | ||
if [[ "${PWD}/" == "/home/jovyan/"* ]]; then | ||
new_wd="/home/${NB_USER}/${PWD:13}" | ||
_log "Changing working directory to ${new_wd}" | ||
cd "${new_wd}" | ||
fi | ||
fi | ||
else | ||
_log "WARNING: unable to fix missing /etc/passwd entry because we don't have write permission. Try setting gid=0 with \"--user=$(id -u):0\"." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM wbitt/network-multitool:e21fa4b | ||
|
||
USER root | ||
|
||
RUN setcap cap_chown,cap_fowner,cap_dac_read_search,cap_dac_override,cap_fsetid,cap_setuid,cap_setgid+ep /bin/chown | ||
RUN setcap cap_chown,cap_fowner,cap_dac_read_search,cap_dac_override,cap_fsetid,cap_setuid,cap_setgid+ep /bin/chmod | ||
|
||
# docker run --user 1000:100 --cap-add=CHOWN --cap-add=FOWNER --cap-add=cap_dac_override --cap-add=cap_dac_read_search --rm -it mymultitool:latest sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Multitool | ||
A container with added capabilities for some selected binaries to be used in init container. | ||
Extented from wbitt/network-multitool former pragma/network-multitool |