Container::Buildah::Stage - object used by Container::Buildah to track a stage of a multi-stage container build
version 0.2.1
# Container::Buildah:Stage objects are created only by Container::Buildah # It passes a separate instance to each stage function sub stage_runtime { my $stage = shift; $stage->run( [qw(/sbin/apk --update upgrade)] ); $stage->add( { dest => "/opt/swpkg" }, "tarball.tar.xz" ); $stage->config({ env => ["SWPKG_LOG=-g"], volume => [qw(/var/cache/swpkg)], port => ["8881"], entrypoint => "/opt/swpkg/entrypoint.sh", }); }
Container::Buildah:Stage objects are created and used by Container::Buildah. These are passed to the callback function for each build-stage container.
The class contains methods which are wrappers for the buildah subcommands that require a container name parameter on the command line. However, the container name is within the object. So it is not passed as a separate parameter to these methods.
Each instance contains the configuration information for that stage of the build.
Container::Buildah::Stage automatically adds the --add-history option so that each action will be recorded as part of the OCI container build history.
instantiates a Container::Buildah:Stage object. This method is private and may only be called by Container::Buildah.
prints a list of strings to STDOUT
Prints a list of strings to STDERR, if debugging is at the specified level. This is a wrapper around the Container::Buildah::debug() method, which adds a label parameter with the container name.
The option parameter is a hash reference with command-line options for buildah-run. For options with shortcut aliases, only the long form is recognized here in order to avoid duplication.
The command parameter can be an array of strings for one command, or array of arrays of strings for multiple commands. This applies the same command-line arguments to each command it runs.
Please report bugs via GitHub at https://github.com/ikluft/Container-Buildah/issues
Patches and enhancements may be submitted via a pull request at https://github.com/ikluft/Container-Buildah/pulls
Ian Kluft <https://github.com/ikluft>
This software is Copyright (c) 2020 by Ian Kluft.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Container::Buildah, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Container::Buildah
CPAN shell
perl -MCPAN -e shell install Container::Buildah
For more information on module installation, please visit the detailed CPAN module installation guide.