podman使用经验

修改镜像容器存储地址(GraphRoot)

podman info # 找到配置文件地址,默认是/etc/containers/storage.conf

store:
  configFile: /etc/containers/storage.conf
  containerStore:

打开或者新建配置文件,修改GraphRoot和runroot地址。

[storage]
# Default Storage Driver
driver = "overlay"

# Temporary storage location
runroot = "/home/podman/containers/temp_storage"

# Primary Read/Write location of container storage
graphroot = "/home/podman/containers/storage"

修改镜像源地址

错误汇总

错误信息

Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 0:42 for /etc/gshadow): lchown /etc/gshadow: invalid argument

机器重启后,服务启动不起来

podman start mariadb

ERRO[0000] Error adding network: failed to allocate for range 0: 10.88.0.127 has been allocated to bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16, duplicate allocation is not allowed
ERRO[0000] Error while adding pod to CNI network "podman": failed to allocate for range 0: 10.88.0.127 has been allocated to bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16, duplicate allocation is not allowed
ERRO[0000] Error preparing container bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16: error configuring network namespace for container bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16: failed to allocate for range 0: 10.88.0.127 has been allocated to bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16, duplicate allocation is not allowed
Error: unable to start container "bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16": failed to mount shm tmpfs "/home/podman/containers/storage/overlay-containers/bb5e67927536b496894013ca3c42221bdfc4f7f72e30878e408bd97d88999e16/userdata/shm": no such file or directory

解决方法:清空网络

echo "" > /var/lib/cni/networks/podman/10.88.0.127

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注