Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Variable Group Docker Env Task
Variable Group Docker Env Task

Variable Group Docker Env Task

Lucas Candido

|
1 install
| (0) | Free
Gera arquivos Docker env de grupos de variáveis do Azure DevOps. Creates Docker env files from Azure DevOps variable groups.
Get it free

Variable Group Docker Env

Português

Gere um arquivo para docker run --env-file a partir de um grupo de variáveis do Azure DevOps em uma pipeline clássica de release ou build. A tarefa inclui variáveis secretas sem precisar listar cada nome na definição da pipeline.

Configuração

  1. Vincule o grupo de variáveis ao estágio que executa a tarefa.
  2. No job do agente, habilite Allow scripts to access the OAuth token. A identidade do job precisa de permissão de leitura no grupo.
  3. Adicione Gerar Docker env / Generate Docker env antes da etapa que inicia o container.
  4. Informe o ID do grupo e um caminho absoluto para o arquivo, como /tmp/app.env.
  5. Use esse caminho em docker run --env-file e apague o arquivo depois de iniciar o container.

O arquivo é criado na máquina do agente. Se o Docker roda em outra máquina via SSH, transfira o arquivo de forma segura antes de iniciar o container.

A tarefa falha quando uma variável não está disponível ou contém uma quebra de linha. Ela não imprime os valores no log. Trate o arquivo gerado como sensível e restrinja o acesso a ele.

English

Generate a file for docker run --env-file from an Azure DevOps variable group in a classic release or build pipeline. The task includes secret variables without listing each name in the pipeline definition.

Setup

  1. Link the variable group to the stage that runs the task.
  2. In the agent job, enable Allow scripts to access the OAuth token. The job identity needs read permission on the group.
  3. Add Gerar Docker env / Generate Docker env before the step that starts the container.
  4. Enter the variable group ID and an absolute output path, such as /tmp/app.env.
  5. Use that path in docker run --env-file and delete the file after the container starts.

The file is created on the agent machine. If Docker runs on another machine through SSH, transfer the file securely before starting the container.

The task fails when a variable is unavailable or contains a newline. It does not print values to the pipeline log. Treat the generated file as sensitive and restrict access to it.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft