Browse Source

Add debug

Maurits van der Schee 5 years ago
parent
commit
56960ce02f
1 changed files with 20 additions and 0 deletions
  1. 20
    0
      docker/debug.sh

+ 20
- 0
docker/debug.sh View File

@@ -0,0 +1,20 @@
1
+#!/bin/bash
2
+FILES=*
3
+i=0
4
+options=()
5
+for f in $FILES; do
6
+    if [[ -d "$f" ]]; then
7
+	((i++))
8
+	options[$i]=$f
9
+    fi
10
+done
11
+PS3="> "
12
+select f in "${options[@]}"; do
13
+    if (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
14
+        break
15
+    else
16
+	exit
17
+    fi
18
+done
19
+docker rm "php-crud-api_$f" > /dev/null 2>&1
20
+docker run -ti --name "php-crud-api_$f" "php-crud-api:$f" /bin/bash -c '/usr/sbin/docker-run && cd php-crud-api && /bin/bash'

Loading…
Cancel
Save