
Podman (Pod Manager) is an open-source, daemonless container for building, managing, and deploying Open Container Initiative (OCI) compatible containers and Pods. Podman does not require a background daemon to run, making it a lightweight, fast, and secure Docker alternative. To get started, you can Install Podman on FreeBSD for managing containers efficiently.
This article explains how to install Podman on FreeBSD 14 and run containerized applications on your server.
Before you begin:
Podman is available in the default package repositories on FreeBSD 14.0. You can install the basic podman package or the podman-suite meta package that includes additional packages such as buildah and skopeo. Follow the steps below to install the latest Podman package on FreeBSD 14.
Update the server's package information index.
Search for all available Podman packages in the default repositories.
Output:
Podman 5.1.1_2 version is available in the default pkg repositories based on the above output.
Install Podman.
View the installed Podman version.
Output:
For users running Ubuntu, check out the detailed steps to Install Podman on Ubuntu 24.04 and efficiently manage your container workloads.
Podman uses multiple files to run on your server with specific networking and storage configurations. Follow the steps below to enable Podman to use the default file system and the default Packet Firewall (pf) template to enable network connections to the Podman service.
Copy the default Podman firewall template to the /etc/ directory.
List all network interfaces on the server and note the public network interface name.
Output:
vtnet0 is the public network interface name based on the above output.
Open the /etc/pf.conf file using a text editor such as vi.
Find the v4egress_if directive and change the value to your public interface name.
Save and close the file.
Enable the pf firewall service to automatically start at boot.
Output:
Start the pf firewall.
Output:
Update the Podman storage.conf file to use the vfs storage driver.
Remove all files in the /var/db/containers/storage directory to apply the vfs storage driver changes.
Podman uses the podman system service to manage the application processes on your server. Follow the steps below to manage the service.
Enable the Podman service to start at boot.
Output:
Start the Podman service.
Stop the Podman service.
Restart Podman.
Mount the fdescfs virtual device to /dev/fd to enable the Podman container restart policy.
Open the /etc/fstab file.
Add the following configuration at the end of the file to make the mounting changes permanent.
Podman discovers new container images from public registries such as Docker Hub by default. Follow the steps below to deploy a sample containerized application using a hello container image.
Deploy a new containerized application using the hello container image,
Output:
The previous command pulls the dougrabson/hello container image from the Docker registry (docker.io) and deploys a new containerized application using the image.
List all active and inactive Podman containers and verify that the hello container application starts and then exits after a specific duration.
Output:
List all container images on your server and verify the hello image is available.
Output:
Podman supports private and public container registries such as the Vultr Container Registry to build, store, and deploy container images. Follow the steps below to use Podman with your Vultr Container Registry to deploy containerized applications on FreeBSD.
Access your Vultr Container Registry's management page and copy the login command in the Example Commands section that contains your registry credentials.
Replace docker in the login command with podman.
Run the podman login command in your terminal to log in to the Vultr Container Registry. Replace vultrfreebsdregistry, example-user, and registry-key with your actual credentials.
Output:
Tag the docker.io/dougrabson/hello Docker image with your desired Vultr Container Registry repository name.
List all Docker images and verify the new tagged image is available.
Output:
Push the tagged Docker image to your Vultr Container Registry.
Output.
Access your Vultr Container Registry's management page, navigate to the Repositories tab, and verify that the new Docker image repository is available.
Deploy a new container using the hello Docker image in your Vultr Container Registry.
Output:
You installed Podman on FreeBSD 14 and deployed containerized applications on your server. After you installed Podman on FreeBSD, you logged in to your Vultr Container Registry, tagged a Docker image, and pushed it to a new repository. Podman supports private and public registries when deploying containers on your server. For more information, visit the Podman documentation.
0 Comments
Be the first to comment and share your perspective with the community.