---
title: Dockerから替わる新しいコンテナ技術の紹介
tags:  #docker #podman #コンテナ  
author: [Yuta](https://www.docswell.com/user/Yuta)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/63EKX1M7DY.jpg?width=480
description: こちらの記事をベースにしたLT資料 https://zenn.dev/yuta28/articles/23d303bb097f69095073
published: March 07, 21
canonical: https://www.docswell.com/s/Yuta/LZ7RJZ-podman
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/63EKX1M7DY.jpg)

Dockerから替わる? 新しいコンテナ技術の紹介

# Page. 2

![Page Image](https://bcdn.docswell.com/page/4L735Q2E5P.jpg)

自己紹介 Name：ユータ Occupation：SRE Twitter：@Y0u281 （オーでなくゼロです） ブログ：https://zenn.dev/yuta28 → 普段触るもの：AWS Ansible Linux Mint Twitter

# Page. 3

![Page Image](https://bcdn.docswell.com/page/V87DD967GD.jpg)

目次 ● Dockerの課題 ● Podmanとは ● Red Hatの積極的推進 ● コンテナ起動 ● Podの作成 ● 感想

# Page. 4

![Page Image](https://bcdn.docswell.com/page/4VJPX9Z786.jpg)

Dockerの課題 ● デーモン依存 ● ルート権限必須 ○ ver19.3からrootless mode搭載 Dockerユーザーのための PodmanとBuildahの紹介 https://rheb.hatenablog.com/entry/2020/07/16/podman_buidah_for_docker_users

# Page. 5

![Page Image](https://bcdn.docswell.com/page/L2EVLMMJQW.jpg)

Podmanとは Red Hat社が開発したコンテナ管理ツール → Podman.io ● デーモンレス ● 一般ユーザで起動可能 ● dockerと互換性有り Dockerユーザーのための PodmanとBuildahの紹介 https://rheb.hatenablog.com/entry/2020/07/16/podman_buidah_for_docker_users

# Page. 6

![Page Image](https://bcdn.docswell.com/page/Z57GXGXELR.jpg)

Red Hatの積極的推進 ● CentOS 8と RHEL 8からdockerコマンドを標準で削除 ● サポートそのものも対象外 ● Red Hat公式リファレンスでもPodmanでのコンテナ管理紹介 ○ コンテナーの構築、実行、および管理 RHEL(CentOS)ならインストールも簡単 yum(dnf) module install -y container-tools

# Page. 7

![Page Image](https://bcdn.docswell.com/page/V4EQ8X5JP5.jpg)

コンテナ起動 $ podman run --rm registry.access.redhat.com/rhel7.2 cat /etc/os-release NAME=&quot;Red Hat Enterprise Linux Server&quot; VERSION=&quot;7.2 (Maipo)&quot; ID=&quot;rhel&quot; ID_LIKE=&quot;fedora&quot; VERSION_ID=&quot;7.2&quot; PRETTY_NAME=&quot;Red Hat Enterprise Linux Server 7.2 (Maipo)&quot; ANSI_COLOR=&quot;0;31&quot; CPE_NAME=&quot;cpe:/o:redhat:enterprise_linux:7.2:GA:server&quot; HOME_URL=&quot;https://www.redhat.com/&quot; BUG_REPORT_URL=&quot;https://bugzilla.redhat.com/&quot; REDHAT_BUGZILLA_PRODUCT=&quot;Red Hat Enterprise Linux 7&quot; REDHAT_BUGZILLA_PRODUCT_VERSION=7.2 REDHAT_SUPPORT_PRODUCT=&quot;Red Hat Enterprise Linux&quot; REDHAT_SUPPORT_PRODUCT_VERSION=&quot;7.2&quot; コンテナを起動し、 OS情報を参照している podan search でコンテナの検索も可能 ★dockerコンテナも起動できる Explore Certified Container Images ↑Red Hat社で管理しているコンテナイメージ群

# Page. 8

![Page Image](https://bcdn.docswell.com/page/DKJ426VE1Q.jpg)

Podの作成 $ podman pod create --name testpod $ podman pod ps POD ID NAME STATUS CREATED # OF CONTAINERS INFRA ID d1d6f6c351f7 testpod Created 8 seconds ago 1 b037a9286dfa $ podman ps -a --pod CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME b037a9286dfa k8s.gcr.io/pause:3.2 38 seconds ago Created d1d6fc351f7-infra d1d6f6c351f7 testpod $ podman run -dt --name mycontainer --pod testpod registry.access.redhat.com/rhel7.5 /bin/bash $ podman pod ps POD ID NAME STATUS CREATED # OF CONTAINERS INFRA ID d1d6f6c351f7 testpod Running 7 minutes ago 2 b037a9286dfa podman ps -a --pod CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME 22714a066cc0 registry.access.redhat.com/rhel7.5:latest /bin/bash 24 seconds ago Up 24 seconds ago mycontainer d1d6f6c351f7 testpod b037a9286dfa k8s.gcr.io/pause:3.2 8 minutes ago Up 24 seconds ago d1d6f6c351f7-infra d1d6f6c351f7 testpod

# Page. 9

![Page Image](https://bcdn.docswell.com/page/PLE1MV47GD.jpg)

Podの作成 Kubernetes YAML ファイルも生成可能 $ podman generate kube testpod &gt; testpod.yml testpod.yml # Generation of Kubernetes YAML is still under development! # # Save the output of this file and use kubectl create -f to import # it into Kubernetes. # # Created with podman-2.0.5 apiVersion: v1 kind: Pod metadata: creationTimestamp: &quot;2020-12-21T17:15:47Z&quot; labels: app: testpod ~~~~

# Page. 10

![Page Image](https://bcdn.docswell.com/page/8GEW3LZE26.jpg)

感想 ● ● ● dockerを触っているなら問題なく扱える インストールしたらすぐに使える Podも作れる こっちを使う理由はブログを見てね

# Page. 11

![Page Image](https://bcdn.docswell.com/page/W47ZVMLE3Y.jpg)

ありがとうございました より詳しい内容はこちらのブログ⇓ PodmanとBuildahとSkopeoを使っ たコンテナ管理

