Giter Site home page Giter Site logo

systemd(websoft9) bug about websoft9 HOT 4 CLOSED

zhaojing1987 avatar zhaojing1987 commented on September 26, 2024
systemd(websoft9) bug

from websoft9.

Comments (4)

chendelin1982 avatar chendelin1982 commented on September 26, 2024

优化获取 apphub 容器 volume 的方法:确保容器已经启动后再获取

from websoft9.

chendelin1982 avatar chendelin1982 commented on September 26, 2024
function get_volume_path() {
    local container_name="\$1"
    local volume_name="\$2"
    local retries=0
    local max_retries=5
    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 1
    done

    echo "Cannot get volume path"
    exit 1
}

# 使用这个函数
get_volume_path "container_name" "volume_name"

from websoft9.

qiaofeng1227 avatar qiaofeng1227 commented on September 26, 2024

针对初次安装 和升级都经过了测试,端口能正常监控并修改。 是手动修改,目前没有测试cockpit升级自动修改的cockpit配置文件的

from websoft9.

chendelin1982 avatar chendelin1982 commented on September 26, 2024

sovled

from websoft9.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.