NAME

Dist::Zilla::Plugin::Docker::API - Build and publish Docker images as Dist::Zilla release artifacts

VERSION

version 0.001

SYNOPSIS

[Docker::API]
phase      = build
repository = ghcr.io/example/my-app
context    = build
file       = Dockerfile

tag = latest
tag = build-%v

push = 0
load = 1

Or for release:

[Docker::API / release]
phase      = release
repository = ghcr.io/example/my-app
context    = archive

tag = %v
tag = v%v
tag = latest

push = 1
fail_if_tag_exists = 1
skip_latest_on_trial = 1

DESCRIPTION

This plugin builds and publishes Docker images as release artifacts derived from the Dist::Zilla-built distribution. The Docker image is built from the files that Dist::Zilla generated, including munged modules, generated Makefile.PL/Build.PL, generated META files, and injected files.

ROLE REQUIREMENTS

This plugin consumes the following roles:

Dist::Zilla::Role::Plugin
Dist::Zilla::Role::AfterBuild
Dist::Zilla::Role::BeforeRelease
Dist::Zilla::Role::Releaser
Dist::Zilla::Role::AfterRelease

CONFIGURATION

phase - When to run. build (default), release, or after_release
repository - Full image repository (required)
context - Build context mode: build (default), source, or archive
file - Dockerfile name (default: Dockerfile)
tag - Image tags (can be repeated). Templates: %n, %v, %g, etc.
push - Push to registry (default: true for release, false for build)
load - Load into local Docker daemon (default: true)
fail_if_tag_exists - Error if tag already exists on remote
skip_latest_on_trial - Skip 'latest' tag for trial releases
build_arg - Build arguments (can be repeated, template-enabled)
label - OCI labels (can be repeated, template-enabled)

SEE ALSO

Dist::Zilla::Plugin::Docker::API::Config, Dist::Zilla::Plugin::Docker::API::TagTemplate, Dist::Zilla::Plugin::Docker::API::Context, Dist::Zilla::Plugin::Docker::API::Client, Dist::Zilla::Plugin::Docker::API::Result

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-dist-zilla-plugin-docker-api/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.