Home - lexemmens/podman-maven-plugin GitHub Wiki
Welcome to the Podman Maven Plugin wiki!
The Podman Maven Plugin is a Maven plugin to build, tag and push OCI compliant images configured using a Dockerfile/Containerfile using Podman.
About
This plugin was created based on the need to build container images with Podman, whilst not having an appropriate plugin to do so. Initially
using the docker-maven-plugin from fabric8io
it quickly became clear that simply swapping
Docker for Podman (alias docker=podman
) did not work as the plugin requires a Docker outlet to communicate with. With other plugins currently
not yet available, the idea was born.
This plugin uses a ProcessExecutor
from ZeroTurnaround to do its magic under water. Although this plugins' structure is similar to that from the
docker-maven-plugin
, its implementation is not. In an effort to keep things simple, I have chosen to use a ProcessExecutor
to run podman
rather
than implementing the logic myself.
Also, only a subset of the podman
s capabilities have been implemented (build, push and save).
This plugin is mainly inspired by the docker-maven-plugin
and shows some similarities in configuration.
Requirements
- Maven 3.6.2 or later
- Java 9 or later
- Podman to be installed on the OS where this plugin will run
- Registry configuration to be present in Maven settings.
- Dockerfile to be present in the module
NOTE: This Plugin only works when a Dockerfile is in your module's folder. You cannot create a complete Dockerfile via configuration in the pom.xml
.
Goals
Goal | Description | Default Lifecycle Phase |
---|---|---|
podman:build |
Build images | install |
podman:push |
Push images to a registry | deploy |
podman:clean |
Clean up local storage | clean |
podman:save |
Save image to a file |