博客
关于我
podman快速入门详解与实践
阅读量:782 次
发布时间:2019-03-24

本文共 811 字,大约阅读时间需要 2 分钟。

Podman简介

Podman最初是CRI-O项目的一部分,后来独立开发为libpod。它强调简单直接,不像Docker有daemon,直接通过OCI运行时(默认是runc)启动容器,这意味着容器进程是podman的子进程。这类似于Linux的fork/exec模型,而非传统的C/S(客户端/服务器)模式。相比之下,fork/exec模式在系统管理和cgroup限制方面有显著优势:

  • 系统管理员可以追踪容器进程来源
  • 可以将cgroup设置为限制所有podman容器
  • 支持SD_NOTIFY机制,在systemd服务中集成
  • 支持socket激活机制

与Docker的兼容性

Podman与Docker高度兼容:

  • 支持直接使用Docker镜像
  • 命令风格相似,甚至可以用Podman设置alias为docker

安装Podman

yum -y install podman

查看版本号

podman version

Podman默认网络模式

默认网段为10.88.0.1/16

(Command-line Options) 命令线选项

...

使用阿里云镜像加速

建议配置阿里云容器镜像以加速镜像访问。Podman的注册表配置文件位于/etc/containers/registries.conf。修改配置文件以实现加速:

unqualified-search-registries = ["docker.io"][[registry]]prefix = "docker.io"location = ".mirror.aliyuncs.com"

完成后,Podman拉取镜像会通过阿里云加速镜像服务。

拉取镜像并运行

下载镜像示例:

podman pull nginx

查看镜像:

podman images

运行镜像:

podman run -itd --name nginx -p 9999:80 f6d0b4767a6c

转载地址:http://ocgkk.baihongyu.com/

你可能感兴趣的文章
NoSQL介绍
查看>>
NoSQL数据库概述
查看>>
Notadd —— 基于 nest.js 的微服务开发框架
查看>>
NOTE:rfc5766-turn-server
查看>>
Notepad ++ 安装与配置教程(非常详细)从零基础入门到精通,看完这一篇就够了
查看>>
Notepad++在线和离线安装JSON格式化插件
查看>>
notepad++最详情汇总
查看>>
notepad++正则表达式替换字符串详解
查看>>
notepad如何自动对齐_notepad++怎么自动排版
查看>>
Notes on Paul Irish's "Things I learned from the jQuery source" casts
查看>>
Notification 使用详解(很全
查看>>
NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty()
查看>>
NotImplementedError: Could not run torchvision::nms
查看>>
nova基于ubs机制扩展scheduler-filter
查看>>
Now trying to drop the old temporary tablespace, the session hangs.
查看>>
nowcoder—Beauty of Trees
查看>>
np.arange()和np.linspace()绘制logistic回归图像时得到不同的结果?
查看>>
np.power的使用
查看>>
NPM 2FA双重认证的设置方法
查看>>
npm build报错Cannot find module ‘html-webpack-plugin‘解决方法
查看>>