Fixed a docker/run current directory issue when invoked with a command to run.
- Legacy-Id: 13819
This commit is contained in:
parent
900174ae57
commit
ad6f18fbf3
|
@ -184,9 +184,9 @@ image=$(docker ps | grep "$REPO:$TAG" | awk '{ print $1 }')
|
|||
if [ "$image" ]; then
|
||||
if [ "$*" ]; then
|
||||
echo "Running 'cd ~/${parent#$HOME/}; $*'"
|
||||
docker exec -u "$WHO" -t $image bash -c "cd '~/${parent#$HOME/}'; $*"
|
||||
docker exec -u "$WHO" -t $image bash -i -c "cd; cd \"${parent#$HOME/}\"; $*"
|
||||
else
|
||||
docker exec -u "$WHO" -ti $image bash
|
||||
docker exec -u "$WHO" -ti $image bash -i
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
|
|
Loading…
Reference in a new issue