新聞中心
Fedora與Podman簡介
Fedora是一個基于RPM(Red Hat Package Manager)的免費開源Linux發(fā)行版,由Red Hat公司贊助并由全球志愿者貢獻,它以穩(wěn)定性和安全性著稱,適用于服務器、桌面和云環(huán)境,而Podman是一個用于構建和管理容器的工具,它允許開發(fā)者使用沙箱技術在同一個系統(tǒng)上運行多個隔離的容器,Podman可以在多種操作系統(tǒng)上運行,包括Fedora。

成都創(chuàng)新互聯(lián)成立十多年來,這條路我們正越走越好,積累了技術與客戶資源,形成了良好的口碑。為客戶提供成都做網站、網站制作、成都外貿網站建設、網站策劃、網頁設計、國際域名空間、網絡營銷、VI設計、網站改版、漏洞修補等服務。網站是否美觀、功能強大、用戶體驗好、性價比高、打開快等等,這些對于網站建設都非常重要,成都創(chuàng)新互聯(lián)通過對建站技術性的掌握、對創(chuàng)意設計的研究為客戶提供一站式互聯(lián)網解決方案,攜手廣大客戶,共同發(fā)展進步。
在Fedora中安裝Podman
1、更新系統(tǒng)軟件包列表:
sudo dnf update
2、安裝必要的依賴項:
sudo dnf install -y libffi-devel docker openssl-devel python-devel
3、下載并安裝Podman:
curl -Lo podman https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/Packages/podman-4.2.0-1.x86_64.rpm sudo dnf -y install ./podman-4.2.0-1.x86_64.rpm
4、驗證Podman是否安裝成功:
podman --version
配置Fedora中的用戶組和權限
為了能夠在所有用戶下使用Podman,我們需要創(chuàng)建一個新的用戶組,并將該用戶組添加到wheel組中,這樣用戶就可以使用sudo命令來執(zhí)行Podman相關操作,我們需要為新創(chuàng)建的用戶組設置密碼策略。
1、創(chuàng)建新的用戶組:
sudo groupadd podman_users
2、將新創(chuàng)建的用戶組添加到wheel組中:
sudo usermod -aG wheel podman_users
3、為新創(chuàng)建的用戶組設置密碼策略:
sudo visudo
在打開的文件中添加以下內容:
%podman_users ALL=(ALL) NOPASSWD: ALL
保存并退出,現(xiàn)在,新創(chuàng)建的用戶組的所有成員都可以在不輸入密碼的情況下使用Podman。
測試Podman在Fedora中的使用
1、創(chuàng)建一個名為test-podman.txt的文本文件,包含以下內容:
FROM ubuntu:latest as builder RUN apt-get update && apt-get install -y git python3 python3-pip build-essential curl wget tar unzip || exit 1; WORKDIR /app; COPY *.sh /app; RUN chmod +x /app/*.sh; CMD ["sh", "run.sh"]
2、在當前目錄下創(chuàng)建一個名為run.sh的腳本文件,包含以下內容:
!/bin/bash -euo pipefail https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ [BEFORE] https://stackoverflow.com/questions/49752530/why-doesnt-set-euxo-work-on-my-bash49752530 [AFTER] https://stackoverflow.com/questions/65978870/how-to-fix-set-euxo-pipefail-is-not-defined65978870 https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ [BEFORE] https://stackoverflow.com/questions/49752530/why-doesnt-set-euxo-work-on-my-bash49752530 [AFTER] https://stackoverflow.com/questions/65978870/how-to-fix-set-euxo-pipefail-is-not-defined65978870 https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ [BEFORE] https://stackoverflow.com/questions/49752530/why-doesnt-set-euxo-work-on-my-bash49752530 [AFTER] https://stackoverflow.com/questions/65978870/how-to-fix-set-euxo-pipefail-is-not-defined65978870 https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ [BEFORE] https://stackoverflow.com/questions/49752530/why-doesnt-set-euxo-work-on-my-bash49752530 [AFTER] https://stackoverflow.com/questions/65978870/how-to-fix-set-euxo-pipefail-is-not-defined65978870 https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ [BEFORE] https://stackoverflow.com/questions/49752530/why-doesnt-set-euxo-work-on-my-bash49752530 [AFTER] https://stackoverflow.com/questions/65978870/how-to-fix-set-euxo
分享文章:如何在Fedora中結合權能使用Podman
網站鏈接:http://m.fisionsoft.com.cn/article/dpeicop.html


咨詢
建站咨詢
