首页 > 系统相关 >Rocky Linux 9 安装 Podman

Rocky Linux 9 安装 Podman

时间:2023-12-12 15:55:54浏览次数:33  
标签:container Rocky podman -- image Podman Linux containers string

1、安装Podman

dnf -y install podman

2、配置镜像加速和私有镜像仓库

# vim /etc/containers/registries.conf
unqualified-search-registries = ["docker.io"]
[[registry]]
prefix = "docker.io"
insecure = false
blocked = false
location = "docker.io"
[[registry]]
location="reg.example.com"
insecure=true
[[registry.mirror]]
location = "hub-mirror.c.163.com"
insecure = true
[[registry.mirror]]
location = "docker.mirrors.ustc.edu.cn"
insecure = true
[[registry.mirror]]
location = "docker.nju.edu.cn"
insecure = true
short-name-mode = "enforcing"

3、Podman使用docker命令

dnf -y install podman-docker

4、命令补全

dnf install bash-completion -y

5、Podman命令

# podman --help
Manage pods, containers and images

Usage:
  podman [options] [command]

Available Commands:
  attach      Attach to a running container
  auto-update Auto update containers according to their auto-update policy
  build       Build an image using instructions from Containerfiles
  commit      Create new image based on the changed container
  container   Manage containers
  cp          Copy files/folders between a container and the local filesystem
  create      Create but do not start a container
  diff        Display the changes to the object's file system
  events      Show podman system events
  exec        Run a process in a running container
  export      Export container's filesystem contents as a tar archive
  generate    Generate structured data based on containers, pods or volumes
  healthcheck Manage health checks on containers
  help        Help about any command
  history     Show history of a specified image
  image       Manage images
  images      List images in local storage
  import      Import a tarball to create a filesystem image
  info        Display podman system information
  init        Initialize one or more containers
  inspect     Display the configuration of object denoted by ID
  kill        Kill one or more running containers with a specific signal
  kube        Play containers, pods or volumes from a structured file
  load        Load image(s) from a tar archive
  login       Log in to a container registry
  logout      Log out of a container registry
  logs        Fetch the logs of one or more containers
  machine     Manage a virtual machine
  manifest    Manipulate manifest lists and image indexes
  mount       Mount a working container's root filesystem
  network     Manage networks
  pause       Pause all the processes in one or more containers
  pod         Manage pods
  port        List port mappings or a specific mapping for the container
  ps          List containers
  pull        Pull an image from a registry
  push        Push an image to a specified destination
  rename      Rename an existing container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images from local storage
  run         Run a command in a new container
  save        Save image(s) to an archive
  search      Search registry for image
  secret      Manage secrets
  start       Start one or more containers
  stats       Display a live stream of container resource usage statistics
  stop        Stop one or more containers
  system      Manage podman
  tag         Add an additional name to a local image
  top         Display the running processes of a container
  unmount     Unmount working container's root filesystem
  unpause     Unpause the processes in one or more containers
  unshare     Run a command in a modified user namespace
  untag       Remove a name from a local image
  update      Update an existing container
  version     Display the Podman version information
  volume      Manage volumes
  wait        Block on one or more containers

Options:
      --cgroup-manager string       Cgroup manager to use ("cgroupfs"|"systemd") (default "systemd")
      --conmon string               Path of the conmon binary
  -c, --connection string           Connection to use for remote Podman service
      --events-backend string       Events backend to use ("file"|"journald"|"none") (default "journald")
      --help                        Help for podman
      --hooks-dir strings           Set the OCI hooks directory path (may be set multiple times) (default [/usr/share/containers/oci/hooks.d])
      --identity string             path to SSH identity file, (CONTAINER_SSHKEY)
      --imagestore string           Path to the 'image store', different from 'graph root', use this to split storing the image into a separate 'image store', see 'man containers-storage.conf' for details
      --log-level string            Log messages above specified level (trace, debug, info, warn, warning, error, fatal, panic) (default "warn")
      --network-cmd-path string     Path to the command for configuring the network
      --network-config-dir string   Path of the configuration directory for networks
      --out string                  Send output (stdout) from podman to a file
  -r, --remote                      Access remote Podman service
      --root string                 Path to the root directory in which data, including images, is stored (default "/var/lib/containers/storage/libpod")
      --runroot string              Path to the 'run directory' where all state information is stored
      --runtime string              Path to the OCI-compatible binary used to run containers. (default "crun")
      --runtime-flag stringArray    add global flags for the container runtime
      --ssh string                  define the ssh mode (default "golang")
      --storage-driver string       Select which storage driver is used to manage storage of images and containers
      --storage-opt stringArray     Used to pass an option to the storage driver
      --syslog                      Output logging information to syslog as well as the console (default false)
      --tmpdir string               Path to the tmp directory for libpod state content.
                                    
                                    Note: use the environment variable 'TMPDIR' to change the temporary storage location for container images, '/var/tmp'.
                                     (default "/run/libpod")
      --transient-store             Enable transient container storage
      --url string                  URL to access Podman service (CONTAINER_HOST) (default "unix:/run/podman/podman.sock")
  -v, --version                     version for podman
      --volumepath string           Path to the volume directory in which volume data is stored (default "/var/lib/containers/storage/volumes")

参考:

https://podman.io/docs
https://sci.nju.edu.cn/9e/05/c30384a564741/page.htm

  

标签:container,Rocky,podman,--,image,Podman,Linux,containers,string
From: https://www.cnblogs.com/a120608yby/p/17896138.html

相关文章

  • gdb本地调试版本移植至ARM-Linux系统
    移植ncurses库本文使用的ncurses版本为ncurses-5.9.tar.gz下载地址:https://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz 1.       将ncurses压缩包拷贝至Linux主机或使用wget命令下载并解压 tar-zxvf ncurses-5.9.tar.gz 2.       解压后进入到ncurses-5.9目录......
  • Linux常用命令
    前言本文意在记录平时在linux系统中的常用命令,还有一些常用软件(比如:nginx、redis、mysql等)的常用命令。以提高自己平常开发效率,因为有的时候会突然忘记。......
  • Linux软件管理
    rpm命令Linuxrpm命令Linuxrpm命令用于管理套件。rpm(英文全拼:redhatpackagemanager)原本是RedHatLinux发行版专门用来管理Linux各项套件的程序,由于它遵循GPL规则且功能强大方便,因而广受欢迎。逐渐受到其他发行版的采用。RPM套件管理方式的出现,让Linux易于安装,......
  • linux 中实现字符串的拼接
     001、简单测试[root@pc1test01]#str1=ab##测试字符串[root@pc1test01]#str2=xy[root@pc1test01]#echo$str1##测试字符串ab[root@pc1test01]#echo$str2xy[root@pc1test01]#str3="$str1$str2"##字符串拼接[root@pc1test01]#echo......
  • in /etc/default/grub:将标志添加intel_iommu=off到GRUB_CMDLINE_LINUX_DEFAULT 禁用英
    in /etc/default/grub:将标志添加intel_iommu=off到GRUB_CMDLINE_LINUX_DEFAULT禁用英特尔睿频加速:echo1|sudotee/sys/devices/system/cpu/intel_pstate/no_turbo......
  • 0x02 Linux Fundamentals Part 3
    Task1、引言这个房间将展示一些您可能日常的实用程序和应用程序,还将通过学习自动化、包管理和服务/应用程序日志记录来提高您的Linux-fu技能。Task2、部署Linux机器 Task3、终端文本编辑器①Nano用法:nanofilename 功能:搜索文本复制和粘贴跳转到行号找出您所在......
  • linux下创建ssh账号并设置指定使用目录
    场景:在linux系统下创建用户,并使用xshell登录,一般我们使用key登录,安全性高1.使用xshell连接服务器,使用root账号sudosu2.创建一个新的系统用户,使用以下命令:sudouseradd-m<username>3.设置该用户的密码,使用以下命令:sudopasswd<username>系统将提示你输入该用户的新密码......
  • 开源的linux可视化管理项目-1panel面板
    推荐一款开源的linux可视化管理项目,运维效率翻倍原创 小羊架构 小羊架构 2023-12-0316:19 发表于广东收录于合集#linux3个#开源5个#编程9个#IT16个#互联网17个  你好呀,我是小羊。linux是个非常好的开源操作系统,功能强大,使用也非常广泛,唯一的缺点就是上手有点难......
  • 在当前的Linux上并安装字体(这里以安装中文字体为例)
    一、如果你想手动上传并安装中文字体,可以按照以下步骤进行:1.下载中文字体文件。你可以在网上找到许多免费的中文字体,例如文泉驿正黑字体。请确保你下载的字体文件是合法和可信的。 我本地提前准备好了,都是TrueType类型中文字体,具体如下(仿宋、宋体、黑体等): 2.将字体文件......
  • linux 中 数组的常见操作
     001、创建数组(三种方法)(下标连续数组和下标不连续数组)a、 002、访问数组(访问全部元素;访问单个元素) 003、遍历数组(利用循环实现;for;while) 004、输出数组的长度(下标连续和下标不连续) 005、输出数组的下标(下标连续和下标不连续) 006、输出数组中每个元素的长度 00......