DockerCompose@0 – Docker Compose v0-uppgift

Skapa, push-överföra eller köra Docker-program med flera containrar. Använd den här uppgiften med Docker eller Azure Container Registry.

Syntax

# Docker Compose v0
# Build, push or run multi-container Docker applications. Task can be used with Docker or Azure Container registry.
- task: DockerCompose@0
  inputs:
    containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required. Container Registry Type. Default: Azure Container Registry.
    #dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry. Docker Registry Service Connection. 
    #azureSubscription: # string. Alias: azureSubscriptionEndpoint. Optional. Use when containerregistrytype = Azure Container Registry. Azure subscription. 
    #azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry. Azure Container Registry. 
    dockerComposeFile: '**/docker-compose.yml' # string. Required. Docker Compose File. Default: **/docker-compose.yml.
    #additionalDockerComposeFiles: # string. Additional Docker Compose Files. 
    #dockerComposeFileArgs: # string. Environment Variables. 
    #projectName: '$(Build.Repository.Name)' # string. Project Name. Default: $(Build.Repository.Name).
    #qualifyImageNames: true # boolean. Qualify Image Names. Default: true.
    action: 'Run a Docker Compose command' # 'Build services' | 'Push services' | 'Run services' | 'Run a specific service' | 'Lock services' | 'Write service image digests' | 'Combine configuration' | 'Run a Docker Compose command'. Required. Action. Default: Run a Docker Compose command.
    #additionalImageTags: # string. Optional. Use when action = Build services || action = Push services. Additional Image Tags. 
    #includeSourceTags: false # boolean. Optional. Use when action = Build services || action = Push services. Include Source Tags. Default: false.
    #includeLatestTag: false # boolean. Optional. Use when action = Build services || action = Push services. Include Latest Tag. Default: false.
    #buildImages: true # boolean. Optional. Use when action = Run services. Build Images. Default: true.
    #serviceName: # string. Required when action = Run a specific service. Service Name. 
    #containerName: # string. Optional. Use when action = Run a specific service. Container Name. 
    #ports: # string. Optional. Use when action = Run a specific service. Ports. 
    #workingDirectory: # string. Alias: workDir. Optional. Use when action = Run a specific service. Working Directory. 
    #entrypoint: # string. Optional. Use when action = Run a specific service. Entry Point Override. 
    #containerCommand: # string. Optional. Use when action = Run a specific service. Command. 
    #detached: true # boolean. Optional. Use when action = Run services || action = Run a specific service. Run in Background. Default: true.
    #abortOnContainerExit: true # boolean. Optional. Use when action = Run services && detached == false. Abort on Container Exit. Default: true.
    #imageDigestComposeFile: '$(Build.StagingDirectory)/docker-compose.images.yml' # string. Required when action = Write service image digests. Image Digest Compose File. Default: $(Build.StagingDirectory)/docker-compose.images.yml.
    #removeBuildOptions: false # boolean. Optional. Use when action = Lock services || action = Combine configuration. Remove Build Options. Default: false.
    #baseResolveDirectory: # string. Optional. Use when action = Lock services || action = Combine configuration. Base Resolve Directory. 
    #outputDockerComposeFile: '$(Build.StagingDirectory)/docker-compose.yml' # string. Required when action = Lock services || action = Combine configuration. Output Docker Compose File. Default: $(Build.StagingDirectory)/docker-compose.yml.
    #dockerComposeCommand: # string. Required when action = Run a Docker Compose command. Command. 
    #arguments: # string. Optional. Use when action != Lock services && action != Combine configuration && action != Write service image digests. Arguments. 
  # Advanced Options
    #dockerHostEndpoint: # string. Docker Host Service Connection. 
    #nopIfNoDockerComposeFile: false # boolean. No-op if no Docker Compose File. Default: false.
    #requireAdditionalDockerComposeFiles: false # boolean. Require Additional Docker Compose Files. Default: false.
    #currentWorkingDirectory: '$(System.DefaultWorkingDirectory)' # string. Alias: cwd. Working Directory. Default: $(System.DefaultWorkingDirectory).
    #dockerComposePath: # string. Docker Compose executable Path.
# Docker Compose v0
# Build, push or run multi-container Docker applications. Task can be used with Docker or Azure Container registry.
- task: DockerCompose@0
  inputs:
    containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required. Container Registry Type. Default: Azure Container Registry.
    #dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry. Docker Registry Service Connection. 
    #azureSubscription: # string. Alias: azureSubscriptionEndpoint. Optional. Use when containerregistrytype = Azure Container Registry. Azure subscription. 
    #azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry. Azure Container Registry. 
    dockerComposeFile: '**/docker-compose.yml' # string. Required. Docker Compose File. Default: **/docker-compose.yml.
    #additionalDockerComposeFiles: # string. Additional Docker Compose Files. 
    #dockerComposeFileArgs: # string. Environment Variables. 
    #projectName: '$(Build.Repository.Name)' # string. Project Name. Default: $(Build.Repository.Name).
    #qualifyImageNames: true # boolean. Qualify Image Names. Default: true.
    action: 'Run a Docker Compose command' # 'Build services' | 'Push services' | 'Run services' | 'Run a specific service' | 'Lock services' | 'Write service image digests' | 'Combine configuration' | 'Run a Docker Compose command'. Required. Action. Default: Run a Docker Compose command.
    #additionalImageTags: # string. Optional. Use when action = Build services || action = Push services. Additional Image Tags. 
    #includeSourceTags: false # boolean. Optional. Use when action = Build services || action = Push services. Include Source Tags. Default: false.
    #includeLatestTag: false # boolean. Optional. Use when action = Build services || action = Push services. Include Latest Tag. Default: false.
    #buildImages: true # boolean. Optional. Use when action = Run services. Build Images. Default: true.
    #serviceName: # string. Required when action = Run a specific service. Service Name. 
    #containerName: # string. Optional. Use when action = Run a specific service. Container Name. 
    #ports: # string. Optional. Use when action = Run a specific service. Ports. 
    #workingDirectory: # string. Alias: workDir. Optional. Use when action = Run a specific service. Working Directory. 
    #entrypoint: # string. Optional. Use when action = Run a specific service. Entry Point Override. 
    #containerCommand: # string. Optional. Use when action = Run a specific service. Command. 
    #detached: true # boolean. Optional. Use when action = Run services || action = Run a specific service. Run in Background. Default: true.
    #abortOnContainerExit: true # boolean. Optional. Use when action = Run services && detached == false. Abort on Container Exit. Default: true.
    #imageDigestComposeFile: '$(Build.StagingDirectory)/docker-compose.images.yml' # string. Required when action = Write service image digests. Image Digest Compose File. Default: $(Build.StagingDirectory)/docker-compose.images.yml.
    #removeBuildOptions: false # boolean. Optional. Use when action = Lock services || action = Combine configuration. Remove Build Options. Default: false.
    #baseResolveDirectory: # string. Optional. Use when action = Lock services || action = Combine configuration. Base Resolve Directory. 
    #outputDockerComposeFile: '$(Build.StagingDirectory)/docker-compose.yml' # string. Required when action = Lock services || action = Combine configuration. Output Docker Compose File. Default: $(Build.StagingDirectory)/docker-compose.yml.
    #dockerComposeCommand: # string. Required when action = Run a Docker Compose command. Command. 
    #arguments: # string. Optional. Use when action != Lock services && action != Combine configuration && action != Write service image digests. Arguments. 
  # Advanced Options
    #dockerHostEndpoint: # string. Docker Host Service Connection. 
    #nopIfNoDockerComposeFile: false # boolean. No-op if no Docker Compose File. Default: false.
    #requireAdditionalDockerComposeFiles: false # boolean. Require Additional Docker Compose Files. Default: false.
    #currentWorkingDirectory: '$(System.DefaultWorkingDirectory)' # string. Alias: cwd. Working Directory. Default: $(System.DefaultWorkingDirectory).
# Docker Compose v0
# Build, push or run multi-container Docker applications. Task can be used with Docker or Azure Container registry.
- task: DockerCompose@0
  inputs:
    containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required. Container Registry Type. Default: Azure Container Registry.
    #dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry. Docker Registry Service Connection. 
    #azureSubscription: # string. Alias: azureSubscriptionEndpoint. Optional. Use when containerregistrytype = Azure Container Registry. Azure subscription. 
    #azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry. Azure Container Registry. 
    dockerComposeFile: '**/docker-compose.yml' # string. Required. Docker Compose File. Default: **/docker-compose.yml.
    #additionalDockerComposeFiles: # string. Additional Docker Compose Files. 
    #dockerComposeFileArgs: # string. Environment Variables. 
    #projectName: '$(Build.Repository.Name)' # string. Project Name. Default: $(Build.Repository.Name).
    #qualifyImageNames: true # boolean. Qualify Image Names. Default: true.
    action: 'Run a Docker Compose command' # 'Build services' | 'Push services' | 'Run services' | 'Run a specific service' | 'Lock services' | 'Write service image digests' | 'Combine configuration' | 'Run a Docker Compose command'. Required. Action. Default: Run a Docker Compose command.
    #additionalImageTags: # string. Optional. Use when action = Build services || action = Push services. Additional Image Tags. 
    #includeSourceTags: false # boolean. Optional. Use when action = Build services || action = Push services. Include Source Tags. Default: false.
    #includeLatestTag: false # boolean. Optional. Use when action = Build services || action = Push services. Include Latest Tag. Default: false.
    #buildImages: true # boolean. Optional. Use when action = Run services. Build Images. Default: true.
    #serviceName: # string. Required when action = Run a specific service. Service Name. 
    #containerName: # string. Optional. Use when action = Run a specific service. Container Name. 
    #ports: # string. Optional. Use when action = Run a specific service. Ports. 
    #workingDirectory: # string. Alias: workDir. Optional. Use when action = Run a specific service. Working Directory. 
    #entrypoint: # string. Optional. Use when action = Run a specific service. Entry Point Override. 
    #containerCommand: # string. Optional. Use when action = Run a specific service. Command. 
    #detached: true # boolean. Optional. Use when action = Run services || action = Run a specific service. Run in Background. Default: true.
    #abortOnContainerExit: true # boolean. Optional. Use when action = Run services && detached == false. Abort on Container Exit. Default: true.
    #imageDigestComposeFile: '$(Build.StagingDirectory)/docker-compose.images.yml' # string. Required when action = Write service image digests. Image Digest Compose File. Default: $(Build.StagingDirectory)/docker-compose.images.yml.
    #removeBuildOptions: false # boolean. Optional. Use when action = Lock services || action = Combine configuration. Remove Build Options. Default: false.
    #baseResolveDirectory: # string. Optional. Use when action = Lock services || action = Combine configuration. Base Resolve Directory. 
    #outputDockerComposeFile: '$(Build.StagingDirectory)/docker-compose.yml' # string. Required when action = Lock services || action = Combine configuration. Output Docker Compose File. Default: $(Build.StagingDirectory)/docker-compose.yml.
    #dockerComposeCommand: # string. Required when action = Run a Docker Compose command. Command. 
  # Advanced Options
    #dockerHostEndpoint: # string. Docker Host Service Connection. 
    #nopIfNoDockerComposeFile: false # boolean. No-op if no Docker Compose File. Default: false.
    #requireAdditionalDockerComposeFiles: false # boolean. Require Additional Docker Compose Files. Default: false.
    #currentWorkingDirectory: '$(System.DefaultWorkingDirectory)' # string. Alias: cwd. Working Directory. Default: $(System.DefaultWorkingDirectory).

Indata

containerregistrytype - Containerregistertyp
string. Krävs. Tillåtna värden: Azure Container Registry, Container Registry. Standardvärde: Azure Container Registry.

Anger en Azure Container Registry typ om du använder ACR. Ange en containerregistertyp om du använder något annat containerregister.


dockerRegistryEndpoint - Docker Registry Service-anslutning
string. Valfritt. Använd när containerregistrytype = Container Registry.

Anger en Docker-registertjänstanslutning. Krävs när kommandon behöver autentiseras med hjälp av ett register.


azureSubscription - Azure-prenumeration
Indataalias: azureSubscriptionEndpoint. string. Valfritt. Använd när containerregistrytype = Azure Container Registry.

Anger en Azure-prenumeration. Namnet på Azure-tjänstanslutningen. Information om hur du konfigurerar anslutningen manuellt finns i Azure Resource Manager-tjänstanslutning.


azureContainerRegistry - Azure Container Registry
string. Valfritt. Använd när containerregistrytype = Azure Container Registry.

Anger en Azure Container Registry.


dockerComposeFile - Docker Compose-fil
string. Krävs. Standardvärde: **/docker-compose.yml.

Anger filsökvägen till den primära Docker Compose-filen.


additionalDockerComposeFiles - Ytterligare Docker Compose-filer
string.

Anger ytterligare Docker Compose-filer som kombineras med den primära Docker Compose-filen. Relativa sökvägar matchas i förhållande till katalogen som innehåller den primära Docker Compose-filen. Om en angiven fil inte hittas ignoreras den. Ange varje filsökväg på en ny rad.


dockerComposeFileArgs - Miljövariabler
string.

Anger eventuella miljövariabler som har angetts.

Format på följande sätt:

  • Lista varje name=value par på en ny rad.
  • Använd operatorn | i YAML för att bevara nya rader.

projectName - Projektnamn
string. Standardvärde: $(Build.Repository.Name).

Anger det projektnamn som ska användas som standard för att namnge bilder och containrar.


qualifyImageNames - Kvalificera bildnamn
boolean. Standardvärde: true.

Som standard anger docker-registertjänstanslutningens värdnamn.


action - Åtgärder
string. Krävs. Tillåtna värden: Build services (Skapa tjänstbilder), Push services (Push-tjänstbilder), Run services (Kör tjänstbilder), Run a specific service (Kör en specifik tjänstbild), Lock services (Lås tjänstbilder), Write service image digests, Combine configuration, Run a Docker Compose command. Standardvärde: Run a Docker Compose command.

Anger en Docker Compose-åtgärd från listan över tillåtna värden.


additionalImageTags - Ytterligare avbildningstaggar
string. Valfritt. Använd när action = Build services || action = Push services.

Anger ytterligare taggar för De Docker-avbildningar som skapas eller push-överförs. Du kan ange flera taggar som avgränsar var och en med en radmatning \n.


includeSourceTags - Inkludera källtaggar
boolean. Valfritt. Använd när action = Build services || action = Push services. Standardvärde: false.

Anger Git-taggar när du skapar eller push-överför Docker-avbildningar.


includeLatestTag - Ta med den senaste taggen
boolean. Valfritt. Använd när action = Build services || action = Push services. Standardvärde: false.

Anger den senaste taggen när du skapar eller push-överför Docker-avbildningar.


buildImages - Skapa avbildningar
boolean. Valfritt. Använd när action = Run services. Standardvärde: true.

Anger build-avbildningar innan du startar tjänstcontainrar.


serviceName - Tjänstnamn
string. Krävs när action = Run a specific service.

Anger namnet på den tjänst som du vill köra.


containerName - Containernamn
string. Valfritt. Använd när action = Run a specific service.

Anger namnet på den tjänstcontainer som du vill använda.


ports - Portar
string. Valfritt. Använd när action = Run a specific service.

Anger portar i tjänstcontainern som ska publiceras på värden. Lägg till varje host-port:container-port bindning på en ny rad.


workingDirectory - Arbetskatalog
Indataalias: workDir. string. Valfritt. Använd när action = Run a specific service.

Anger arbetskatalogen för tjänstcontainern.


entrypoint - Åsidosättning av startpunkt
string. Valfritt. Använd när action = Run a specific service.

Anger ett åsidosättningsvärde för standardstartpunkten för tjänstcontainern.


containerCommand - Kommandot
string. Valfritt. Använd när action = Run a specific service.

Anger kommandot som ska köras i tjänstcontainern. Om avbildningen till exempel innehåller ett enkelt Python Flask-webbprogram kan du ange python app.py att webbappen ska startas.


detached - Kör i bakgrunden
boolean. Valfritt. Använd när action = Run services || action = Run a specific service. Standardvärde: true.

Anger vilka tjänstcontainrar som ska köras i bakgrunden.


abortOnContainerExit - Avbryt vid containeravslut
boolean. Valfritt. Använd när action = Run services && detached == false. Standardvärde: true.

Anger alla containrar som ska stoppas när en container avslutas.


imageDigestComposeFile - Bildsammanfattningsfil
string. Krävs när action = Write service image digests. Standardvärde: $(Build.StagingDirectory)/docker-compose.images.yml.

Anger sökvägen till en Docker Compose-fil som skapas och fylls med de fullständiga avbildningslagringsplatserna för varje tjänsts Docker-avbildning.


removeBuildOptions - Ta bort byggalternativ
boolean. Valfritt. Använd när action = Lock services || action = Combine configuration. Standardvärde: false.

Anger om byggalternativ ska tas bort från Docker Compose-utdatafilen.


baseResolveDirectory - Base Resolve Directory
string. Valfritt. Använd när action = Lock services || action = Combine configuration.

Anger den baskatalog från vilken relativa sökvägar i docker compose-utdatafilen ska matchas.


outputDockerComposeFile - Docker Compose-utdatafil
string. Krävs när action = Lock services || action = Combine configuration. Standardvärde: $(Build.StagingDirectory)/docker-compose.yml.

Anger sökvägen till en Docker Compose-utdatafil.


dockerComposeCommand - Kommandot
string. Krävs när action = Run a Docker Compose command.

Anger kommandot Docker Compose som ska köras med argument. Om du till exempel rm --all vill ta bort alla stoppade tjänstcontainrar.


arguments - Argument
string. Valfritt. Använd när action != Lock services && action != Combine configuration && action != Write service image digests.

Anger Kommandoalternativ för Docker Compose.

Exempel: För kommandot build, --pull --compress --parallel.


dockerHostEndpoint - Docker-värdtjänstanslutning
string.

Anger en Docker-värdtjänstanslutning. Standardvärdet är agentens värd.


nopIfNoDockerComposeFile - No-op om ingen Docker Compose-fil
boolean. Standardvärde: false.

Anger ett värde för att hoppa över uppgiften om Docker Compose-filen inte finns. Det här alternativet är användbart när uppgiften erbjuder valfritt beteende baserat på förekomsten av en Docker Compose-fil på lagringsplatsen.


requireAdditionalDockerComposeFiles - Kräv ytterligare Docker Compose-filer
boolean. Standardvärde: false.

Anger ett värde för att skapa ett fel om de ytterligare Docker Compose-filerna inte finns. Det här alternativet åsidosätter standardbeteendet som skulle ignorera en fil om den inte finns.


currentWorkingDirectory - Arbetskatalog
Indataalias: cwd. string. Standardvärde: $(System.DefaultWorkingDirectory).

Anger arbetskatalogen för Kommandot Docker Compose.


dockerComposePath - Körbar sökväg för Docker Compose
string.

Anger en sökväg för att avgöra om den körbara docker-compose används.


Kontrollalternativ för aktivitet

Alla aktiviteter har kontrollalternativ utöver sina aktivitetsindata. Mer information finns i Kontrollalternativ och vanliga uppgiftsegenskaper.

Utdatavariabler

Den här uppgiften definierar följande utdatavariabler, som du kan använda i underordnade steg, jobb och steg.

DockerComposeOutput
Sökvägen till de filer som innehåller kommandots utdata. Detta kan innehålla flera filsökvägar (avgränsade med nya radtecken) som dockerComposeRun-kommandot (en för körning och en för ned), dockerPush (en för varje avbildning som pushas), dockerBuild (själva versionen och alla taggkommandon) och dockerDigest (en för varje avbildning som hämtas). De andra kommandona matar bara ut en fil.

Inga.

Kommentarer

Använd den här uppgiften för att skapa, push-överföra eller köra Docker-program med flera containrar. Använd den här uppgiften med ett Docker-register eller en Azure Container Registry.

Exempel

Azure Container Registry

Det här YAML-exemplet anger indata för Azure Container Registry:

variables:
  azureContainerRegistry: Contoso.azurecr.io
  azureSubscriptionEndpoint: Contoso
steps:
- task: DockerCompose@0
  displayName: Container registry login
  inputs:
    containerregistrytype: Azure Container Registry
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)

Andra containerregister

Värdet containerregistrytype krävs när du använder något annat containerregister än ACR. Använd containerregistrytype: Container Registry i det här fallet.

Det här YAML-exemplet anger ett annat containerregister än ACR där Contoso är namnet på Docker-registertjänstanslutningen för containerregistret:

- task: DockerCompose@0
  displayName: Container registry login
  inputs:
    containerregistrytype: Container Registry
    dockerRegistryEndpoint: Contoso

Skapa tjänstbilder

Det här YAML-exemplet skapar avbildningen där avbildningsnamnet är kvalificerat baserat på indata relaterade till Azure Container Registry:

- task: DockerCompose@0
  displayName: Build services
  inputs:
    action: Build services
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    additionalImageTags: $(Build.BuildId)
    dockerComposeFileArgs: |
      firstArg=$(firstArg)
      secondArg=$(secondArg)

Push-tjänstbilder

Det här YAML-exemplet skickar en avbildning till ett containerregister:

- task: DockerCompose@0
  displayName: Push services
  inputs:
    action: Push services
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    additionalImageTags: $(Build.BuildId)

Köra tjänstbilder

Det här YAML-exemplet kör tjänster:

- task: DockerCompose@0
  displayName: Run services
  inputs:
    action: Run services
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.ci.build.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    buildImages: true
    abortOnContainerExit: true
    detached: true

Köra en specifik tjänstbild

Det här YAML-exemplet kör en specifik tjänst:

- task: DockerCompose@0
  displayName: Run a specific service
  inputs:
    action: Run a specific service
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    serviceName: myhealth.web
    ports: 80:80
    detached: true

Låsa tjänstbilder

Det här YAML-exemplet låser tjänster:

- task: DockerCompose@0
  displayName: Lock services
  inputs:
    action: Lock services
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    outputDockerComposeFile: $(Build.StagingDirectory)/docker-compose.yml

Skriva sammanfattningar av tjänstbilder

Det här YAML-exemplet skriver tjänstbildsammandrag:

- task: DockerCompose@0
  displayName: Write service image digests
  inputs:
    action: Write service image digests
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    imageDigestComposeFile: $(Build.StagingDirectory)/docker-compose.images.yml 

Kombinera konfiguration

Det här YAML-exemplet kombinerar konfigurationer:

- task: DockerCompose@0
  displayName: Combine configuration
  inputs:
    action: Combine configuration
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml
    additionalDockerComposeFiles: docker-compose.override.yml
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    outputDockerComposeFile: $(Build.StagingDirectory)/docker-compose.yml

Köra ett Docker Compose-kommando

Det här YAML-exemplet kör ett Docker Compose-kommando:

- task: DockerCompose@0
  displayName: Run a Docker Compose command
  inputs:
    action: Run a Docker Compose command
    azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
    azureContainerRegistry: $(azureContainerRegistry)
    dockerComposeFile: docker-compose.yml 
    projectName: $(Build.Repository.Name)
    qualifyImageNames: true
    dockerComposeCommand: rm

Krav

Krav Beskrivning
Pipelinetyper YAML, klassisk version, klassisk version
Körs på Agent, DeploymentGroup
Krav Ingen
Funktioner Den här aktiviteten uppfyller inte några krav för efterföljande uppgifter i jobbet.
Kommandobegränsningar Valfri
Inställningsbara variabler Valfri
Agentversion Alla agentversioner som stöds.
Uppgiftskategori Build