# Podman ## Ubuntu安裝網站 https://software.opensuse.org//download.html?project=devel%3Akubic%3Alibcontainers%3Astable&package=podman Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust (more information). >$ echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list >$ curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_18.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_stable.gpg > /dev/null >$ sudo apt update >$ sudo apt install podman ## podman與docker不共存會相衝 ## 可以curl但不能ping ### 不通原因為rootless的關係,但使用ping需要setuid權限所以會沒辦法ping https://github.com/containers/podman/blob/master/troubleshooting.md#5-rootless-containers-cannot-ping-hosts 5)無根容器無法ping通主機 從非根容器使用ping命令時,由於缺少特權,該命令可能會失敗。 症狀 $ podman run --rm fedora ping -W10 -c1 redhat.com PING redhat.com(209.132.183.105):56個數據字節 --- redhat.com ping統計信息---已 發送1個數據包,已接收0個數據包,100%數據包丟失 解 最有必要在主機上啟用非特權ping。確保用戶的UID在/proc/sys/net/ipv4/ping_group_range文件範圍內 。 要更改其值,您可以使用類似:的方法sysctl -w "net.ipv4.ping_group_range=0 2000000"。 要使更改持久化,您需要在/etc/sysctl.d其中包含一個文件 net.ipv4.ping_group_range=0 $MAX_UID。 # 在contaier內ping www.hinet.net 會出現ip解析代表網路有通
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up