Rocky9安装podman和podman-compose

陈项禹
2023-12-01

podman是docker的替代品,语法和docker基本一致。
podman-compose是docker-compose的替代品。

  1. 安装podman
yum install podman
podman -v
podman version 4.1.1
  1. 查看是否安装pip3
pip3 --version
bash: pip3: command not found
  1. 安装pip3
https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python3 get-pip.py

pip3 --version
pip 22.2.2 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
  1. 安装podman-compose
pip3 install podman-compose

podman-compose -v
['podman', '--version', '']
using podman version: 4.1.1
podman-composer version  1.0.3
podman --version
podman version 4.1.1
exit code: 0
  1. 设置镜像网站
    Podman 默认注册表配置文件在 /etc/containers/registries.conf
vim /etc/containers/registries.conf

unqualified-search-registries = ["docker.io"]

[[registry]]
prefix = "docker.io"
location = "docker.io"
#阿里云,xxxxxxxx为你的id
[[registry.mirror]]
location = "xxxxxxxx.mirror.aliyuncs.com"
#网易
[[registry.mirror]]
location = "hub-mirror.c.163.com"
#USTC
[[registry.mirror]]
location = "docker.mirrors.ustc.edu.cn"
#docker官方中国区
[[registry.mirror]]
location = "registry.docker-cn.com"
 类似资料: