Posted on:
Last modified:
podman 基本上和 docker 命令兼容
-l、--latest
选项,直接操作上一个 container,而不需要找到 id 然后再操作。Podman 最贴心的的部分在于命令行更加人性化。
比如说:
podman stop -l
podman rm -a
pip3 install podman-compose
podman 有个 bug,默认不会打开 cache,需要使用 --layers
手动打开.
podman build --layers .
虽然在 mac 上,可以用 podman 自己带的虚拟机,但是这个虚拟机是 CentOS 的系统,不太习惯, 所以还是用 multipass 起一个 ubuntu 的机器来用吧。
multipass launch -c 2 -m 8G -d 64G -n podman
multipass mount $HOME podman:/home/ubuntu/host
multipass shell podman
#!/bin/sh
ubuntu_version='22.04'
key_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key"
sources_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}"
echo "deb $sources_url/ /" | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL $key_url | gpg --dearmor | tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
apt update
apt install podman
apt-get install -y qemu-user-static
reboot
podman build --platform linux/amd64
© 2016-2022 Yifei Kong. Powered by ynotes
All contents are under the CC-BY-NC-SA license, if not otherwise specified.
Opinions expressed here are solely my own and do not express the views or opinions of my employer.
友情链接: MySQL 教程站