Podman : Linux コンテナーを利用する2026/01/09 |
|
FreeBSD 上で Linux コンテナーを扱うことができます。 |
|
| [1] | Linux サービスを起動しておきます。 |
|
root@dlp:~ # service linux enable linux enabled in /etc/rc.conf root@dlp:~ # service linux start |
| [2] | Linux イメージを Pull してコンテナーを実行します。 Linux コンテナー実行時には [--os=linux] オプションを付加します。 |
|
root@dlp:~ # podman pull --os=linux docker.io/library/ubuntu:latest Trying to pull docker.io/library/ubuntu:latest... Getting image source signatures Copying blob 20043066d3d5 done | Copying config c3a134f2ac done | Writing manifest to image destination c3a134f2ace4f6d480733efcfef27c60ea8ed48be1cd36f2c17ec0729775b2c8root@dlp:~ # podman images REPOSITORY TAG IMAGE ID CREATED SIZE localhost/freebsd-base latest afb96df72092 17 minutes ago 902 MB docker.io/library/ubuntu latest c3a134f2ace4 2 months ago 80.6 MBroot@dlp:~ # podman run --os=linux ubuntu /usr/bin/cat "/etc/os-release" PRETTY_NAME="Ubuntu 24.04.3 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logoroot@dlp:~ # podman pull --os=linux quay.io/centos/centos:stream10 Trying to pull quay.io/centos/centos:stream10... Getting image source signatures Copying blob 4fa259f7309a done | Copying config e9ac565bc2 done | Writing manifest to image destination e9ac565bc256ac91e505e7fe1aa75c083595441c44404cb8af99952d2c63f028root@dlp:~ # podman run --os=linux centos:stream10 /usr/bin/cat "/etc/os-release" NAME="CentOS Stream" VERSION="10 (Coughlan)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="10" PLATFORM_ID="platform:el10" PRETTY_NAME="CentOS Stream 10 (Coughlan)" ANSI_COLOR="0;31" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:centos:centos:10" HOME_URL="https://centos.org/" VENDOR_NAME="CentOS" VENDOR_URL="https://centos.org/" BUG_REPORT_URL="https://issues.redhat.com/" REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 10" REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream" |
| Sponsored Link |
|
|