FreeBSD 14
Sponsored Link

Podman : Run Linux Container2024/02/28

 

It's possible to work with Linux containers on FreeBSD.

[1] Enable Linux service first.
root@dlp:~ #
service linux enable

linux enabled in /etc/rc.conf
root@dlp:~ #
service linux start

[2] Pull the Linux image and run the container.
Add the [--os=linux] option when running a Linux container.
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 01007420e9b0 done   |
Copying config 3db8720ecb done   |
Writing manifest to image destination
3db8720ecbf5f5927d409cc61f9b4f7ffe23283917caaa992f847c4d83338cc1

root@dlp:~ #
podman images

REPOSITORY                TAG         IMAGE ID      CREATED       SIZE
localhost/freebsd-base    latest      2527bfa5eeb4  19 hours ago  1.05 GB
docker.io/library/ubuntu  latest      3db8720ecbf5  2 weeks ago   80.4 MB

root@dlp:~ #
podman run --os=linux ubuntu /usr/bin/cat "/etc/os-release"

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
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=jammy

root@dlp:~ #
podman pull --os=linux quay.io/centos/centos:stream9

Trying to pull quay.io/centos/centos:stream9...
Getting image source signatures
Copying blob a4fce492bde6 done   |
Copying config ce3ac91d40 done   |
Writing manifest to image destination
ce3ac91d4020428344ad02c814c80686213daadf3d110d3adb57c473a62616ab

root@dlp:~ #
podman run --os=linux centos:stream9 /usr/bin/cat "/etc/os-release"

NAME="CentOS Stream"
VERSION="9"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="9"
PLATFORM_ID="platform:el9"
PRETTY_NAME="CentOS Stream 9"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:centos:centos:9"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
Matched Content