mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
2.0.5
This commit is contained in:
parent
76534fac30
commit
611142260a
2 changed files with 5 additions and 21 deletions
|
@ -21,26 +21,10 @@ check_ports() {
|
||||||
|
|
||||||
# get volume from container
|
# get volume from container
|
||||||
function get_volume_path() {
|
function get_volume_path() {
|
||||||
local container_name="\$1"
|
local container_name="$1"
|
||||||
local volume_name="\$2"
|
local volume_name="$2"
|
||||||
local retries=0
|
local mounts=$(docker inspect -f '{{ json .Mounts }}' "$container_name" | jq -r '.[] | select(.Name == "'$volume_name'") | .Source')
|
||||||
local max_retries=5
|
echo "$mounts"
|
||||||
local mounts
|
|
||||||
|
|
||||||
while [ $retries -lt $max_retries ]; do
|
|
||||||
mounts=$(docker inspect -f '{{ json .Mounts }}' "$container_name" | jq -r ".[] | select(.Name == \"$volume_name\") | .Source")
|
|
||||||
|
|
||||||
if [[ "$mounts" == *"/"* ]]; then
|
|
||||||
echo "$mounts"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
((retries++))
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Cannot get volume path"
|
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
volume_path=$(get_volume_path "$container_name" "$volume_name")
|
volume_path=$(get_volume_path "$container_name" "$volume_name")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"portainer": "0.0.9",
|
"portainer": "0.0.9",
|
||||||
"nginx": "0.0.7",
|
"nginx": "0.0.7",
|
||||||
|
|
Loading…
Reference in a new issue