Skip to content

ALOps Docker Create

Build a Business Central Docker image from BC artifacts.

Property Value
Task name (Azure DevOps) ALOpsDockerCreate@3
Action name (GitHub) alops-dockercreate
Version 3.0.0
Category Utility
OS requirement Both
Preview yes

Build a BC Docker image from artifacts. Resolves artifact URLs, downloads app + platform artifacts, generates a Dockerfile, and builds the image. Supports Docker registry authentication, test toolkit inclusion, licensing, and multitenancy.

Inputs

artifact

Name Type Required Default Platform Description
artifact_specification PickList no Specific Both How to resolve BC artifacts. 'Specific' uses the version/type/country fields directly. 'Hint' reads them from a JSON hint file. Options: Specific, Hint.
artifact_version Text no (empty) Both BC artifact version, for example '24.0'. Leave empty for latest.
artifact_type PickList no Sandbox Both Type of BC artifact to download. Options: OnPrem, Sandbox.
artifact_country Text no (empty) Both Country code for the BC artifact (e.g. 'us', 'w1'). Leave empty for W1.
version_select PickList no Latest Both Version selection strategy when multiple versions match. Options: Latest, Current, Daily, Weekly, First.
artifact_hint Text no (empty) Both Path to a JSON hint file containing Version, Type, and Country fields. Used when Artifact Specification is 'Hint'.
alternative_artifact_url Text no (empty) Both Direct URL to BC artifacts. Overrides all other artifact resolution fields.
storage_account Text no (empty) Both Azure storage account for artifact downloads. Leave empty for default.
sas_token Secret no (empty) Both SAS token for private artifact storage. Store this in a pipeline secret variable.

image

Name Type Required Default Platform Description
image_prefix Text no (empty) Both Prefix for the Docker image name (e.g. registry hostname). Can include registry path.
image_name_template Text no %IMAGE_PREFIX%-%ARTIFACT_TYPE%-%ARTIFACT_VERSION%-%ARTIFACT_COUNTRY%-%OS_LTSC% Both Template for generating the image name. Tokens: %IMAGE_PREFIX%, %ARTIFACT_TYPE%, %ARTIFACT_VERSION%, %ARTIFACT_COUNTRY%, %OS_VERSION%, %OS_LTSC%.
use_generic_image Text no (empty) Both Override the base generic image. Leave empty for auto-detection based on host OS.
memory Text no 8G Both Docker build memory limit (e.g. '8G', '16G').
force_create_image Boolean no false Both Force image rebuild even if the image already exists locally or in the registry.
my_scripts MultiLine no (empty) Both Scripts to embed in the image's c:\run\my folder. One path or URL per line. Supports | delimiter for backward compatibility.

authentication

Name Type Required Default Platform Description
docker_registry Text no (empty) Both Docker registry URL for push/pull. Leave empty if not using a private registry.
docker_username Text no (empty) Both Username for Docker registry authentication.
docker_password Secret no (empty) Both Password for Docker registry authentication. Store this in a pipeline secret variable.

testtoolkit

Name Type Required Default Platform Description
include_test_toolkit Boolean no false Both Include the full BC test toolkit in the image.
include_test_libraries_only Boolean no false Both Include only test libraries (not the full test toolkit).
include_test_framework_only Boolean no false Both Include only the test framework (not test libraries or full toolkit).
include_performance_toolkit Boolean no false Both Include the BC performance toolkit in the image.

licensing

Name Type Required Default Platform Description
license_file Text no (empty) Both Path or URL to a BC license file (.flf or .bclicense) to embed in the image.
accept_insider_eula Boolean no false Both Accept the Insider EULA for preview/insider artifact builds.

features

Name Type Required Default Platform Description
multitenant Boolean no false Both Build a multitenant BC Docker image.

Outputs

Name Description
image_name The name of the built Docker image.

Usage

- task: ALOpsDockerCreate@3
  displayName: 'ALOps Docker Create'
  inputs:
    artifact_specification: Specific                                                                     # How to resolve BC artifacts. 'Specific' uses the version/type/country fields directly. 'Hint' reads them from a JSON hint file. $(artifact_specification)
    artifact_version:                                                                                    # BC artifact version, for example '24.0'. Leave empty for latest. $(artifact_version)
    artifact_type: Sandbox                                                                               # Type of BC artifact to download. $(artifact_type)
    artifact_country:                                                                                    # Country code for the BC artifact (e.g. 'us', 'w1'). Leave empty for W1. $(artifact_country)
    version_select: Latest                                                                               # Version selection strategy when multiple versions match. $(version_select)
    artifact_hint:                                                                                       # Path to a JSON hint file containing Version, Type, and Country fields. Used when Artifact Specification is 'Hint'. $(artifact_hint)
    alternative_artifact_url:                                                                            # Direct URL to BC artifacts. Overrides all other artifact resolution fields. $(alternative_artifact_url)
    storage_account:                                                                                     # Azure storage account for artifact downloads. Leave empty for default. $(storage_account)
    sas_token:                                                                                           # SAS token for private artifact storage. Store this in a pipeline secret variable. $(sas_token)
    image_prefix:                                                                                        # Prefix for the Docker image name (e.g. registry hostname). Can include registry path. $(image_prefix)
    image_name_template: %IMAGE_PREFIX%-%ARTIFACT_TYPE%-%ARTIFACT_VERSION%-%ARTIFACT_COUNTRY%-%OS_LTSC%  # Template for generating the image name. Tokens: %IMAGE_PREFIX%, %ARTIFACT_TYPE%, %ARTIFACT_VERSION%, %ARTIFACT_COUNTRY%, %OS_VERSION%, %OS_LTSC%. $(image_name_template)
    use_generic_image:                                                                                   # Override the base generic image. Leave empty for auto-detection based on host OS. $(use_generic_image)
    memory: 8G                                                                                           # Docker build memory limit (e.g. '8G', '16G'). $(memory)
    force_create_image: False                                                                            # Force image rebuild even if the image already exists locally or in the registry. $(force_create_image)
    my_scripts:                                                                                          # Scripts to embed in the image's c:\run\my folder. One path or URL per line. Supports | delimiter for backward compatibility. $(my_scripts)
    docker_registry:                                                                                     # Docker registry URL for push/pull. Leave empty if not using a private registry. $(docker_registry)
    docker_username:                                                                                     # Username for Docker registry authentication. $(docker_username)
    docker_password:                                                                                     # Password for Docker registry authentication. Store this in a pipeline secret variable. $(docker_password)
    include_test_toolkit: False                                                                          # Include the full BC test toolkit in the image. $(include_test_toolkit)
    include_test_libraries_only: False                                                                   # Include only test libraries (not the full test toolkit). $(include_test_libraries_only)
    include_test_framework_only: False                                                                   # Include only the test framework (not test libraries or full toolkit). $(include_test_framework_only)
    include_performance_toolkit: False                                                                   # Include the BC performance toolkit in the image. $(include_performance_toolkit)
    license_file:                                                                                        # Path or URL to a BC license file (.flf or .bclicense) to embed in the image. $(license_file)
    accept_insider_eula: False                                                                           # Accept the Insider EULA for preview/insider artifact builds. $(accept_insider_eula)
    multitenant: False                                                                                   # Build a multitenant BC Docker image. $(multitenant)
- name: ALOps Docker Create
  uses: HodorNV/ALOps-V3/alops-dockercreate@v3   <!-- TODO: confirm action repo path -->
  with:
    artifact_specification: 'Specific'
    artifact_version: ''
    artifact_type: 'Sandbox'
    artifact_country: ''
    version_select: 'Latest'
    artifact_hint: ''
    alternative_artifact_url: ''
    storage_account: ''
    sas_token: ''
    image_prefix: ''
    image_name_template: '%IMAGE_PREFIX%-%ARTIFACT_TYPE%-%ARTIFACT_VERSION%-%ARTIFACT_COUNTRY%-%OS_LTSC%'
    use_generic_image: ''
    memory: '8G'
    force_create_image: 'false'
    my_scripts: ''
    docker_registry: ''
    docker_username: ''
    docker_password: ''
    include_test_toolkit: 'false'
    include_test_libraries_only: 'false'
    include_test_framework_only: 'false'
    include_performance_toolkit: 'false'
    license_file: ''
    accept_insider_eula: 'false'
    multitenant: 'false'