Compare commits

..

2 Commits
1.8.0 ... 1.8.1

Author SHA1 Message Date
Jose Diaz-Gonzalez
e4272eabde Release 1.8.1 2019-06-11 15:45:36 -04:00
Jose Diaz-Gonzalez
4f7e01973a fix: ensure the tracked container id is up to date
If the ID file contained an incorrect value, calling :start would say the service is started but :info would still show the container as missing.

Also fix an issue where docker inspect leaked stderr when the container was missing.

Refs dokku/dokku-redis#133
2019-06-11 15:44:54 -04:00
3 changed files with 6 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ docker_ports_options() {
get_container_ip() {
declare desc="Retrieves the ip address of a container"
declare CONTAINER_ID="$1"
docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$CONTAINER_ID"
docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$CONTAINER_ID" 2>/dev/null
}
get_database_name() {

View File

@@ -130,6 +130,10 @@ service_start() {
local ID=$(docker ps -aq --no-trunc --filter "status=running" --filter "name=^/$SERVICE_NAME$" --format '{{ .ID }}') || true
if [[ -n $ID ]]; then
[[ -z $QUIET ]] && dokku_log_warn "Service is already started"
if [[ ! -f "$SERVICE_ROOT/ID" ]] || [[ "$(cat "$SERVICE_ROOT/ID")" != "$ID" ]]; then
[[ -z $QUIET ]] && dokku_log_warn "Updating local container ID"
echo "$ID" >"$SERVICE_ROOT/ID"
fi
return 0
fi

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku mysql service plugin"
version = "1.8.0"
version = "1.8.1"
[plugin.config]