Signed-off-by: Wang Chenglong 18509160991@163.com --- container/docker-rootfs/setup-image | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/container/docker-rootfs/setup-image b/container/docker-rootfs/setup-image index 787a42c..6a121d3 100755 --- a/container/docker-rootfs/setup-image +++ b/container/docker-rootfs/setup-image @@ -4,8 +4,15 @@
install_packages() { - yum install -y --skip-broken $(</tmp/packages-to-install) - yum clean all + if [ $(command -v yum) ]; then + yum install -y --skip-broken $(</tmp/packages-to-install) + yum clean all + elif [ $(command -v apt-get) ]; then + apt update + apt-get install -y --no-install-recommends $(</tmp/packages-to-install) + elif [ $(command -v pacman) ]; then + pacman -Sy --noconfirm $(</tmp/packages-to-install) + fi }
remove_file()