Skip to content

Commit 354309f

Browse files
authored
Merge pull request #154 from janis-vitols/bug/ps/grep/binary
Fix `No such container: Binary`
2 parents 28a8a0f + 26a1948 commit 354309f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

functions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ service_create_container() {
8181
service_stop "$SERVICE" > /dev/null
8282
docker run --rm -i -v "$SERVICE_HOST_ROOT/data:/var/lib/postgresql/data" "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION" bash -s < "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts/enable_ssl.sh" &> /dev/null
8383

84-
PREVIOUS_ID=$(docker ps -f status=exited | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
84+
PREVIOUS_ID=$(docker ps -f status=exited --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
8585
docker start "$PREVIOUS_ID" > /dev/null
8686
service_port_unpause "$SERVICE"
8787

@@ -122,14 +122,14 @@ service_start() {
122122
local QUIET="$2"
123123
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
124124
local SERVICE_NAME="$(get_service_name "$SERVICE")"
125-
local ID=$(docker ps -f status=running | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
125+
local ID=$(docker ps -f status=running --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
126126
if [[ -n $ID ]]; then
127127
[[ -z $QUIET ]] && dokku_log_warn "Service is already started"
128128
return 0
129129
fi
130130

131131
dokku_log_info2_quiet "Starting container"
132-
local PREVIOUS_ID=$(docker ps -f status=exited | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
132+
local PREVIOUS_ID=$(docker ps -f status=exited --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
133133
local PASSWORD="$(cat "$SERVICE_ROOT/PASSWORD")"
134134

135135
if [[ -n $PREVIOUS_ID ]]; then

0 commit comments

Comments
 (0)