Skip to content

Commit

Permalink
tidy permissions and login info
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Feb 14, 2018
1 parent f8d0c0a commit 81b0eb0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ install:
$DCC build sirf
# extract updated ccache
sudo rm -rf devel/.ccache/*
$DCC run --rm sirf /bin/bash -c 'sudo cp -R /opt/ccache/* /devel/.ccache/'
$DCC run --rm sirf /bin/bash -c 'sudo cp -a /opt/ccache/* /devel/.ccache/'
# replace travis' ccache with the built images's
mv devel/.ccache ~
)
Expand Down
2 changes: 1 addition & 1 deletion docker/devel/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
pip install -U nose
pushd /opt/SIRF-SuperBuild
pushd $SIRF_PATH/../..

./INSTALL/bin/gadgetron >& gadgetron.log&
# print for debugging
Expand Down
10 changes: 8 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ mainUser=${mainUser:-sirfuser}
OLD_HOME=/home-away
export HOME=/home/$mainUser

if [ -d $HOME ]; then
cd $HOME
exec gosu $mainUser "$@"
fi

cd /
mv $OLD_HOME $HOME
cd $HOME

echo "$UID:$GID Creating and switching to: $mainUser:$USER_ID:$GROUP_ID"
# groupadd -g $GROUP_ID -o -f $mainUser
addgroup --system --gid "$GROUP_ID" "$mainUser"
addgroup --quiet --system --gid "$GROUP_ID" "$mainUser"
# useradd --shell /bin/bash -u $USER_ID -o -c "" -M -d $HOME \
# -g $mainUser -G sudo $mainUser \
# -p $(echo somepassword | openssl passwd -1 -stdin)
adduser --system --shell /bin/bash --no-create-home --home /home/"$mainUser" \
adduser --quiet --system --shell /bin/bash \
--no-create-home --home /home/"$mainUser" \
--ingroup "$mainUser" --uid "$USER_ID" "$mainUser"

echo "$mainUser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/"$mainUser"
Expand Down

0 comments on commit 81b0eb0

Please sign in to comment.