[zsh][docker] Use link for ssh auth
Otherwise docker may return that the volume cannot be found. Because SSH_AUTH_SOCK may change (e.g. after a reboot)
This commit is contained in:
parent
02bd808f80
commit
1e630967e1
@ -160,8 +160,15 @@ function secure_chromium {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sdocker (){
|
sdocker (){
|
||||||
|
DOCKER_SSH_AUTH=$HOME/docker_ssh_auth
|
||||||
if [ -n "$SSH_AUTH_SOCK" ]; then
|
if [ -n "$SSH_AUTH_SOCK" ]; then
|
||||||
SSH_AUTH_ARGS="-v $SSH_AUTH_SOCK:/tmp/ssh_auth -e SSH_AUTH_SOCK=/tmp/ssh_auth"
|
$(ls -l $HOME/docker_ssh_auth 2> /dev/null | grep $SSH_AUTH_SOCK > /dev/null)
|
||||||
|
if [ $? ];
|
||||||
|
then
|
||||||
|
unlink $DOCKER_SSH_AUTH > /dev/null
|
||||||
|
ln -s $SSH_AUTH_SOCK $DOCKER_SSH_AUTH
|
||||||
|
fi
|
||||||
|
SSH_AUTH_ARGS="-v $DOCKER_SSH_AUTH:/tmp/ssh_auth -e SSH_AUTH_SOCK=/tmp/ssh_auth"
|
||||||
fi
|
fi
|
||||||
AOSP_ARGS=${AOSP_ARGS:--it}
|
AOSP_ARGS=${AOSP_ARGS:--it}
|
||||||
img=$(docker ps | grep $1 | awk '{print $1}');
|
img=$(docker ps | grep $1 | awk '{print $1}');
|
||||||
|
Loading…
Reference in New Issue
Block a user