You can create a custom template and use it to define a container.

About this task

A template is a reusable configuration that you can use for provisioning a container or a suite of containers.

The Templates page displays template images that are available to you based on registries that you define. You can create a custom template, based on an existing template image or import a template or Docker Compose file. See Import a Container Template or Docker Compose File.

You can also create a custom template or image by using the Provision > Enter additional info option described in Provision a Container from a Template or Image.

Prerequisites

  • Verify that you have container administrator role privileges.

Procedure

  1. Log in to the vRealize Automation console as a container administrator.
  2. Click the Containers tab.
  3. Click Templates in the left pane.

    A list displays the templates and images that are available for provisioning.

    • Configured templates in the Images view.

    • Existing or custom templates in the Template view.

    • All available templates and images based on your specified registries in the All view.

    The Import and Export options are also available to import or export templates and images.

  4. Select an existing template or import a YAML template file.
  5. Select a template from the Views pane.
    1. Click Templates to open the Template view.
    2. Click Edit in the upper-right section of the template that you want to customize.
  6. Import a YAML template.
    1. Click the Import template or Docker Compose icon.

      The Import Template page appears.

    2. Provide the YAML file content.

      Option

      Description

      Load from File

      Click Load from File to browse to and select the YAML file from a directory.

      Enter template or Docker Compose

      Paste the content of a properly formatted YAML file in the Enter template or Docker Compose text box.

    3. Click Import.
    Note:

    You can also use the provided Search field to search for and import templates.

What to do next

You can edit a template for future provisioning. Existing applications that were provisioned from the template are not affected by changes that you make to the template after provisioning.