Skip to content

[docs-scanner] Azure DevOps example has incomplete Docker task #25084

@docker-agent

Description

@docker-agent

File: content/manuals/scout/integrations/environment/cli.md

Issue

The Azure DevOps example includes an incomplete task configuration:

steps:
  - task: Docker@2
  - script: docker run -it \
      -e DOCKER_SCOUT_HUB_USER=$DOCKER_SCOUT_HUB_USER \
      -e DOCKER_SCOUT_HUB_PASSWORD=$DOCKER_SCOUT_HUB_PASSWORD \
      docker/scout-cli:1.0.2 environment \
      --org "<MY_DOCKER_ORG>" \
      "<ENVIRONMENT>" $(image):$(tag)

The - task: Docker@2 line has no parameters. In Azure DevOps, the Docker@2 task requires at least a command input to function. Without parameters, this task would fail.

Why this matters

A reader copying this example would encounter a pipeline error because the Docker@2 task is incomplete. It's unclear what this task is supposed to do - perhaps login to Docker Hub, or it may be a leftover from editing.

Suggested fix

If the Docker@2 task is meant to handle Docker login, specify it:

steps:
  - task: Docker@2
    inputs:
      command: login
      containerRegistry: dockerRegistryServiceConnection
  - script: docker run -it \
      -e DOCKER_SCOUT_HUB_USER=$DOCKER_SCOUT_HUB_USER \
      -e DOCKER_SCOUT_HUB_PASSWORD=$DOCKER_SCOUT_HUB_PASSWORD \
      docker/scout-cli:1.0.2 environment \
      --org "<MY_DOCKER_ORG>" \
      "<ENVIRONMENT>" $(image):$(tag)

Or, if login is handled via environment variables (as the script suggests), remove the incomplete task:

steps:
  - script: docker run -it \
      -e DOCKER_SCOUT_HUB_USER=$DOCKER_SCOUT_HUB_USER \
      -e DOCKER_SCOUT_HUB_PASSWORD=$DOCKER_SCOUT_HUB_PASSWORD \
      docker/scout-cli:1.0.2 environment \
      --org "<MY_DOCKER_ORG>" \
      "<ENVIRONMENT>" $(image):$(tag)

Found by nightly documentation quality scanner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions