Zum Inhalt springen
Image-Erstellung

Image-Erstellung

Packer, entwickelt von Hashicorp, ist ein Werkzeug zur Erstellung von virtuellen Maschinen- und Container-Images.

Dokumentation

Einrichtung

Abhängigkeit von packer hinzufügen.

~/tp/ $ yq -i e '.dependencies["packer.io"]="^1.9"' pkgx.yaml

In der Projektumgebung aktivieren.

~/tp/ $ dev on
 ✓  ~/.pkgx/packer.io/v1.9.4
env +packer.io

Der Befehl packer steht nun in unserer Umgebung zur Verfügung.

~/tp/ $ packer
Usage: packer [--version] [--help] <command> [<args>]

Available commands are:
    build           build image(s) from template
    console         creates a console for testing variable interpolation
    fix             fixes templates from old versions of packer
    fmt             Rewrites HCL2 config files to canonical format
    hcl2_upgrade    transform a JSON template into an HCL2 configuration
    init            Install missing plugins or upgrade plugins
    inspect         see components of a template
    plugins         Interact with Packer plugins and catalog
    validate        check that a template is valid
    version         Prints the Packer version