Podman maybe a Docker alternative?
What is Podman?
Podman is a container management tool that offers similar features to Docker for managing containers.
One of the best features of Podman is its ability to run rootless containers. A rootless container is a concept of running and managing containers without root privileges. From a security standpoint, rootless containers add a layer of security by not allowing root access even if the container gets compromised by an attacker.
Podman also comes with a unique feature that Docker lacks entirely namely "pods". In podman, containers can form “pods” that operate together. The "pod" concept lets you manage multiple containers combined. You can create separate containers for a single app, for instance, a frontend, a backend, and a database container, then add them to a pod, and manage them integrally.
more info and download: getting-started
macOS homebrew: brew install Podman
After installation is finished, in your terminal: podman version
To run Podman
initialize Podman: podman machine init --cpus 4 --disk-size 50 --memory 4096
start Podman: podman machine start
Testing the Podman installation
Clone Alpine Nginx from GitHub:
git clone https://github.com/RobertoTorino/podman-sample.git && cd podman-sample/alpine_nginx
Create Podman image:
podman build --format docker --tag alpine_nginx .
When the process is finished create a Podman container:
podman run -dt -p 9999:80 alpine_nginx
Check running containers:
podman ps -a
Test the connection, this should return a response:
curl http://localhost:9999
Test localhost in your browser, this should return a response, paste this in your browser:
http://localhost:9999/
When you receive this error message:
level=warning msg= "< SOME_MESSAGE_HERE > is not supported for OCI image format and will be ignored. Must use `docker` format"
Then use this in your build command:
--format docker
example: podman build --format docker --tag alpine_nginx .
For more info to get started with Podman
Check this: getting-started
Pods explained: click here
Podman on Github: GitHub
Podman and Docker
Both Podman and Docker comply with the OCI container standard, Podman can also build containers from a Dockerfile. If you can build and run a container from a Dockerfile with Docker, then you can run it with Podman as well.
What is Podman desktop?
Podman Desktop enables you to easily work with containers from your local environment and installs, configures and keeps Podman up to date. It provides a system tray, to check status and interact with your container engine, images, pods and volumes. Podman Desktop also provides capabilities to connect and deploy pods to Kubernetes environments and is compatible with docker.
More info and download: podman-desktop
macOS homebrew:
brew install podman-desktop
For more info to get started with Podman desktop
Check this: podman-desktop and podman-desktop on Github: GitHub
Some useful commands when starting with Podman:
podman search [image-name]
podman pull [image-name]
podman run [image-name]
podman stop [container-id]
podman rm [container-id]
podman rmi [image-name]
podman images
podman info
podman image prune -a
podman system prune
podman kill $(podman ps -q )