Skip to content

ALOps Docker Remove

Stop and remove a Business Central Docker container.

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

Stop and remove a Business Central Docker container. Optionally creates SQL and EventLog backups before removal, prints container logs, and performs Docker registry logout.

Inputs

container

Name Type Required Default Platform Description
fixed_tag Text no (empty) Both Fixed container label. When set, the container is identified by this value instead of the build ID.
print_logs Boolean no true Both Print all container logs before removal. Useful for post-mortem diagnostics.

backup

Name Type Required Default Platform Description
createsqlbackup PickList no disabled Both When to create a SQL database backup from the container. 'On Failure' requires job_status to be set (see Cleanup Options). Options: disabled, onfailure, always.
sqlcompression Boolean no false Both Use SQL backup compression. Not supported on SQL Server Express editions.
createeventlogbackup PickList no disabled Both When to create an Application EventLog backup from the container. 'On Failure' requires job_status to be set (see Cleanup Options). Options: disabled, onfailure, always.

cleanup

Name Type Required Default Platform Description
job_status Text no Succeeded Both Pipeline job status for 'On Failure' backup logic. Set to 'Agent.JobStatus' in Azure DevOps or 'job.status' in GitHub Actions.
docker_registry Text no (empty) Both Docker registry URL for logout. Leave empty to skip logout. Should match the registry used in ALOps Docker Start.

Usage

- task: ALOpsDockerRemove@3
  displayName: 'ALOps Docker Remove'
  inputs:
    fixed_tag:                            # Fixed container label. When set, the container is identified by this value instead of the build ID. $(fixed_tag)
    print_logs: True                      # Print all container logs before removal. Useful for post-mortem diagnostics. $(print_logs)
    createsqlbackup: disabled             # When to create a SQL database backup from the container. 'On Failure' requires job_status to be set (see Cleanup Options). $(createsqlbackup)
    sqlcompression: False                 # Use SQL backup compression. Not supported on SQL Server Express editions. $(sqlcompression)
    createeventlogbackup: disabled        # When to create an Application EventLog backup from the container. 'On Failure' requires job_status to be set (see Cleanup Options). $(createeventlogbackup)
    job_status: Succeeded                 # Pipeline job status for 'On Failure' backup logic. Set to 'Agent.JobStatus' in Azure DevOps or 'job.status' in GitHub Actions. $(job_status)
    docker_registry:                      # Docker registry URL for logout. Leave empty to skip logout. Should match the registry used in ALOps Docker Start. $(docker_registry)
- name: ALOps Docker Remove
  uses: HodorNV/ALOps-V3/alops-dockerremove@v3   <!-- TODO: confirm action repo path -->
  with:
    fixed_tag: ''
    print_logs: 'true'
    createsqlbackup: 'disabled'
    sqlcompression: 'false'
    createeventlogbackup: 'disabled'
    job_status: 'Succeeded'
    docker_registry: ''