Skip to content
Snippets Groups Projects

Update cbmdock/cbmdockInit.sh

Merged Eoin Clerkin requested to merge e.clerkin/cbmtools:e.clerkin-master-patch-65461 into master
1 file
+ 3
8
Compare changes
  • Side-by-side
  • Inline
+ 3
8
@@ -33,15 +33,10 @@ docker exec -t --user root ${ContainerName} bash -c "\
@@ -33,15 +33,10 @@ docker exec -t --user root ${ContainerName} bash -c "\
echo 'cbmdock ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/cbmdock && \
echo 'cbmdock ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/cbmdock && \
chmod 0440 /etc/sudoers.d/cbmdock "
chmod 0440 /etc/sudoers.d/cbmdock "
# create cbmdock alias on the host. It runs a shell in the container with an actual DISPLAY value
# create cbmdock alias on the host. It runs a shell in the container with an actual DISPLAY value
if[[ `alias | grep -q cbmdock`]]
source ~/.bashrc
if [[ `alias | grep cbmdock | wc -l` -eq 0 ]]
then
then
echo create cbmdock alias
echo "alias cbmdock='docker start "${ContainerName}"; docker exec -ti -e DISPLAY=\$DISPLAY "${ContainerName}" bash'" >> ~/.bashrc
echo "alias cbmdock='docker start "${ContainerName}"; docker exec -ti -e DISPLAY=\$DISPLAY "${ContainerName}" bash'" >> ~/.bashrc
else
echo cbmdock alias already exists
fi
fi
 
 
source ~/.bashrc
Loading