Skip to content

Commit

Permalink
Improve bin/attach
Browse files Browse the repository at this point in the history
1) The socker name using "-" instead of "_" now, for example: kitsu-tools-web-1

2) Some docker has no bash, so we can use sh instead

./bin/attach web
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
  • Loading branch information
coolgw committed Aug 12, 2023
1 parent 3c85450 commit a92f552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/attach
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ IFS='/' read -ra ADDR <<< "$BINDIR"
POS=$((${#ADDR[@]} - 2))
DIR=${ADDR[$POS]}

docker exec -it "${DIR}_$1_1" /bin/bash
docker exec -it "${DIR}-$1-1" /bin/bash || docker exec -it "${DIR}-$1-1" /bin/sh

0 comments on commit a92f552

Please sign in to comment.