fix: only return one container when searching (#22)
This commit is contained in:
parent
76bf57baf3
commit
b639405e9b
1 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,8 @@ fi
|
||||||
|
|
||||||
containerName="${containerName}${NEXTCLOUD_CONTAINER_NAME}"
|
containerName="${containerName}${NEXTCLOUD_CONTAINER_NAME}"
|
||||||
|
|
||||||
# Get the ID of the container so we can exec something in it later
|
# Get the ID of the first matching container so we can exec something in it later
|
||||||
docker ps --format '{{.Names}},{{.ID}}' | \
|
docker ps --format '{{.Names}},{{.ID}}' | \
|
||||||
egrep "^${containerName}${matchEnd}" | \
|
egrep "^${containerName}${matchEnd}" | \
|
||||||
awk '{split($0,a,","); print a[2]}'
|
awk '{split($0,a,","); print a[2]}' | \
|
||||||
|
head -n 1
|
||||||
|
|
Loading…
Reference in a new issue