podman is a multi-platform tool allowing management of containers, pods and images and an alternative to Docker.
Both solutions allow user to deploy numerous web apps, database systems and other tools on single system, regardless of if those were designed to run in parallel (at cost of additional compute power needed to run container of additional system each).
There significant differences between podman and Docker although podman has been designed around intention of being command-line compatible with Docker. Both appear to be suitable for production use with podman being apparently easier to run without root service (although Docker offers optional rootless setup).
sudo apt install podman
sudo useradd --create-home --shell /bin/bash podmanuser
sudo loginctl enable-linger podmanuser
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
FROM ubuntu:jammy
RUN apt update && apt upgrade
COPY script.sh /script.sh
EXPOSE 80
ENTRYPOINT /bin/bash /script.sh
podman build --tag image_name .
podman stop container_name
podman rm container_name
podman run \
--publish host_port:container_port \
--name container_name \
--restart always \
image_name
Last update: 2024-05-20