Docker@1 - Attività Docker v1
Compilare, tag, eseguire push o eseguire immagini Docker o eseguire un comando Docker. Usare questa attività con Docker o il Registro Azure Container.
Nota
Docker@2 è una versione più recente di questa attività che semplifica l'attività rimuovendo gli input che possono essere passati come argomenti al comando.
Sintassi
# Docker v1
# Build, tag, push, or run Docker images, or run a Docker command.
- task: Docker@1
inputs:
# Container Registry
#containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required when command != logout. Container registry type. Default: Azure Container Registry.
#dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry && command != logout. Docker registry service connection.
#azureSubscriptionEndpoint: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure subscription.
#azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure container registry.
# Commands
#addBaseImageData: true # boolean. Add base image metadata to image(s). Default: true.
command: 'Build an image' # 'Build an image' | 'Tag image' | 'Push an image' | 'Run an image' | 'login' | 'logout'. Required. Command. Default: Build an image.
#dockerFile: '**/Dockerfile' # string. Required when command = Build an image || command = build. Dockerfile. Default: **/Dockerfile.
#arguments: # string. Optional. Use when command != login && command != logout. Arguments.
#pushMultipleImages: false # boolean. Optional. Use when command = Push an image || command = push. Push multiple images. Default: false.
#tagMultipleImages: false # boolean. Optional. Use when command = Tag image || command = tag. Tag multiple images. Default: false.
#imageName: '$(Build.Repository.Name):$(Build.BuildId)' # string. Required when command = Build an image || command = build || command = Run an image || command = run || pushMultipleImages = false || tagMultipleImages = false. Image name. Default: $(Build.Repository.Name):$(Build.BuildId).
#imageNamesPath: # string. Required when tagMultipleImages = true || pushMultipleImages = true. Image names path.
#qualifyImageName: true # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push || command = Run an image || command = run. Qualify image name. Default: true.
#qualifySourceImageName: false # boolean. Optional. Use when command = Tag image || command = tag. Qualify source image name. Default: false.
#includeSourceTags: false # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push. Include source tags. Default: false.
#includeLatestTag: false # boolean. Optional. Use when command = Build an image || command = build. Include latest tag. Default: false.
#addDefaultLabels: true # boolean. Optional. Use when addDefaultLabels = false. Add default labels. Default: true.
#useDefaultContext: true # boolean. Optional. Use when command = Build an image || command = build. Use default build context. Default: true.
#buildContext: # string. Optional. Use when useDefaultContext = false. Build context.
#imageDigestFile: # string. Optional. Use when command = Push an image || command = push. Image digest file.
#containerName: # string. Optional. Use when command = Run an image || command = run. Container name.
#ports: # string. Optional. Use when command = Run an image || command = run. Ports.
#volumes: # string. Optional. Use when command = Run an image || command = run. Volumes.
#envVars: # string. Optional. Use when command = Run an image || command = run. Environment variables.
#workingDirectory: # string. Optional. Use when command = Run an image || command = run. Working directory.
#entrypointOverride: # string. Optional. Use when command = Run an image || command = run. Entry point override.
#containerCommand: # string. Optional. Use when command = Run an image || command = run. Container command.
#runInBackground: true # boolean. Optional. Use when command = Run an image || command = run. Run in background. Default: true.
restartPolicy: 'no' # 'no' | 'onFailure' | 'always' | 'unlessStopped'. Required when runInBackground = true. Restart policy. Default: no.
#maxRestartRetries: # string. Optional. Use when runInBackground = true && restartPolicy = onFailure. Maximum restart retries.
# Advanced Options
#dockerHostEndpoint: # string. Optional. Use when command != login && command != logout. Docker host service connection.
#enforceDockerNamingConvention: true # boolean. Optional. Use when command != login && command != logout. Force image name to follow Docker naming convention. Default: true.
#memoryLimit: # string. Optional. Use when command != login && command != logout. Memory limit.
# Docker v1
# Build, tag, push, or run Docker images, or run a Docker command.
- task: Docker@1
inputs:
# Container Registry
#containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required when command != logout. Container registry type. Default: Azure Container Registry.
#dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry && command != logout. Docker registry service connection.
#azureSubscriptionEndpoint: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure subscription.
#azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure container registry.
# Commands
command: 'Build an image' # 'Build an image' | 'Tag image' | 'Push an image' | 'Run an image' | 'login' | 'logout'. Required. Command. Default: Build an image.
#dockerFile: '**/Dockerfile' # string. Required when command = Build an image || command = build. Dockerfile. Default: **/Dockerfile.
#arguments: # string. Optional. Use when command != login && command != logout. Arguments.
#pushMultipleImages: false # boolean. Optional. Use when command = Push an image || command = push. Push multiple images. Default: false.
#tagMultipleImages: false # boolean. Optional. Use when command = Tag image || command = tag. Tag multiple images. Default: false.
#imageName: '$(Build.Repository.Name):$(Build.BuildId)' # string. Required when command = Build an image || command = build || command = Run an image || command = run || pushMultipleImages = false || tagMultipleImages = false. Image name. Default: $(Build.Repository.Name):$(Build.BuildId).
#imageNamesPath: # string. Required when tagMultipleImages = true || pushMultipleImages = true. Image names path.
#qualifyImageName: true # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push || command = Run an image || command = run. Qualify image name. Default: true.
#qualifySourceImageName: false # boolean. Optional. Use when command = Tag image || command = tag. Qualify source image name. Default: false.
#includeSourceTags: false # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push. Include source tags. Default: false.
#includeLatestTag: false # boolean. Optional. Use when command = Build an image || command = build. Include latest tag. Default: false.
#addDefaultLabels: true # boolean. Optional. Use when addDefaultLabels = false. Add default labels. Default: true.
#useDefaultContext: true # boolean. Optional. Use when command = Build an image || command = build. Use default build context. Default: true.
#buildContext: # string. Optional. Use when useDefaultContext = false. Build context.
#imageDigestFile: # string. Optional. Use when command = Push an image || command = push. Image digest file.
#containerName: # string. Optional. Use when command = Run an image || command = run. Container name.
#ports: # string. Optional. Use when command = Run an image || command = run. Ports.
#volumes: # string. Optional. Use when command = Run an image || command = run. Volumes.
#envVars: # string. Optional. Use when command = Run an image || command = run. Environment variables.
#workingDirectory: # string. Optional. Use when command = Run an image || command = run. Working directory.
#entrypointOverride: # string. Optional. Use when command = Run an image || command = run. Entry point override.
#containerCommand: # string. Optional. Use when command = Run an image || command = run. Container command.
#runInBackground: true # boolean. Optional. Use when command = Run an image || command = run. Run in background. Default: true.
restartPolicy: 'no' # 'no' | 'onFailure' | 'always' | 'unlessStopped'. Required when runInBackground = true. Restart policy. Default: no.
#maxRestartRetries: # string. Optional. Use when runInBackground = true && restartPolicy = onFailure. Maximum restart retries.
# Advanced Options
#dockerHostEndpoint: # string. Optional. Use when command != login && command != logout. Docker host service connection.
#enforceDockerNamingConvention: true # boolean. Optional. Use when command != login && command != logout. Force image name to follow Docker naming convention. Default: true.
#memoryLimit: # string. Optional. Use when command != login && command != logout. Memory limit.
# Docker v1
# Build, tag, push, or run Docker images, or run a Docker command.
- task: Docker@1
inputs:
# Container Registry
#containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required when command != logout. Container registry type. Default: Azure Container Registry.
#dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry && command != logout. Docker registry service connection.
#azureSubscriptionEndpoint: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure subscription.
#azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure container registry.
# Commands
command: 'Build an image' # 'Build an image' | 'Tag image' | 'Push an image' | 'Run an image' | 'login' | 'logout'. Required. Command. Default: Build an image.
#dockerFile: '**/Dockerfile' # string. Required when command = Build an image || command = build. Dockerfile. Default: **/Dockerfile.
#arguments: # string. Optional. Use when command != login && command != logout. Arguments.
#pushMultipleImages: false # boolean. Optional. Use when command = Push an image || command = push. Push multiple images. Default: false.
#tagMultipleImages: false # boolean. Optional. Use when command = Tag image || command = tag. Tag multiple images. Default: false.
#imageName: '$(Build.Repository.Name):$(Build.BuildId)' # string. Required when command = Build an image || command = build || command = Run an image || command = run || pushMultipleImages = false || tagMultipleImages = false. Image name. Default: $(Build.Repository.Name):$(Build.BuildId).
#imageNamesPath: # string. Required when tagMultipleImages = true || pushMultipleImages = true. Image names path.
#qualifyImageName: true # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push || command = Run an image || command = run. Qualify image name. Default: true.
#includeSourceTags: false # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push. Include source tags. Default: false.
#includeLatestTag: false # boolean. Optional. Use when command = Build an image || command = build. Include latest tag. Default: false.
#addDefaultLabels: true # boolean. Optional. Use when addDefaultLabels = false. Add default labels. Default: true.
#useDefaultContext: true # boolean. Optional. Use when command = Build an image || command = build. Use default build context. Default: true.
#buildContext: # string. Optional. Use when useDefaultContext = false. Build context.
#imageDigestFile: # string. Optional. Use when command = Push an image || command = push. Image digest file.
#containerName: # string. Optional. Use when command = Run an image || command = run. Container name.
#ports: # string. Optional. Use when command = Run an image || command = run. Ports.
#volumes: # string. Optional. Use when command = Run an image || command = run. Volumes.
#envVars: # string. Optional. Use when command = Run an image || command = run. Environment variables.
#workingDirectory: # string. Optional. Use when command = Run an image || command = run. Working directory.
#entrypointOverride: # string. Optional. Use when command = Run an image || command = run. Entry point override.
#containerCommand: # string. Optional. Use when command = Run an image || command = run. Container command.
#runInBackground: true # boolean. Optional. Use when command = Run an image || command = run. Run in background. Default: true.
restartPolicy: 'no' # 'no' | 'onFailure' | 'always' | 'unlessStopped'. Required when runInBackground = true. Restart policy. Default: no.
#maxRestartRetries: # string. Optional. Use when runInBackground = true && restartPolicy = onFailure. Maximum restart retries.
# Advanced Options
#dockerHostEndpoint: # string. Optional. Use when command != login && command != logout. Docker host service connection.
#enforceDockerNamingConvention: true # boolean. Optional. Use when command != login && command != logout. Force image name to follow Docker naming convention. Default: true.
#memoryLimit: # string. Optional. Use when command != login && command != logout. Memory limit.
# Docker v1
# Build, tag, push, or run Docker images, or run a Docker command. Task can be used with Docker or Azure Container registry.
- task: Docker@1
inputs:
# Container Registry
#containerregistrytype: 'Azure Container Registry' # 'Azure Container Registry' | 'Container Registry'. Required when command != logout. Container registry type. Default: Azure Container Registry.
#dockerRegistryEndpoint: # string. Optional. Use when containerregistrytype = Container Registry && command != logout. Docker registry service connection.
#azureSubscriptionEndpoint: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure subscription.
#azureContainerRegistry: # string. Optional. Use when containerregistrytype = Azure Container Registry && command != logout. Azure container registry.
# Commands
command: 'Build an image' # 'Build an image' | 'Tag image' | 'Push an image' | 'Run an image' | 'login' | 'logout'. Required. Command. Default: Build an image.
#dockerFile: '**/Dockerfile' # string. Required when command = Build an image || command = build. Dockerfile. Default: **/Dockerfile.
#arguments: # string. Optional. Use when command != Run an image && command != run && command != login && command != logout. Arguments.
#useDefaultContext: true # boolean. Optional. Use when command = Build an image || command = build. Use default build context. Default: true.
#buildContext: # string. Optional. Use when useDefaultContext = false. Build context.
#pushMultipleImages: false # boolean. Optional. Use when command = Push an image || command = push. Push multiple images. Default: false.
#tagMultipleImages: false # boolean. Optional. Use when command = Tag image || command = tag. Tag multiple images. Default: false.
#imageName: '$(Build.Repository.Name):$(Build.BuildId)' # string. Required when command = Build an image || command = build || command = Run an image || command = run || pushMultipleImages = false || tagMultipleImages = false. Image name. Default: $(Build.Repository.Name):$(Build.BuildId).
#imageNamesPath: # string. Required when tagMultipleImages = true || pushMultipleImages = true. Image names path.
#qualifyImageName: true # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push || command = Run an image || command = run. Qualify image name. Default: true.
#includeSourceTags: false # boolean. Optional. Use when command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push. Include source tags. Default: false.
#includeLatestTag: false # boolean. Optional. Use when command = Build an image || command = build. Include latest tag. Default: false.
#addDefaultLabels: true # boolean. Optional. Use when command = Build an image || command = build. Add default labels. Default: true.
#imageDigestFile: # string. Optional. Use when command = Push an image || command = push. Image digest file.
#containerName: # string. Optional. Use when command = Run an image || command = run. Container name.
#ports: # string. Optional. Use when command = Run an image || command = run. Ports.
#volumes: # string. Optional. Use when command = Run an image || command = run. Volumes.
#envVars: # string. Optional. Use when command = Run an image || command = run. Environment variables.
#workingDirectory: # string. Optional. Use when command = Run an image || command = run. Working directory.
#entrypointOverride: # string. Optional. Use when command = Run an image || command = run. Entry point override.
#containerCommand: # string. Optional. Use when command = Run an image || command = run. Command.
#runInBackground: true # boolean. Optional. Use when command = Run an image || command = run. Run in background. Default: true.
restartPolicy: 'no' # 'no' | 'onFailure' | 'always' | 'unlessStopped'. Required when runInBackground = true. Restart policy. Default: no.
#maxRestartRetries: # string. Optional. Use when runInBackground = true && restartPolicy = onFailure. Maximum restart retries.
# Advanced Options
#dockerHostEndpoint: # string. Optional. Use when command != login && command != logout. Docker host service connection.
#enforceDockerNamingConvention: true # boolean. Optional. Use when command != login && command != logout. Force image name to follow Docker naming convention. Default: true.
#memoryLimit: # string. Optional. Use when command != login && command != logout. Memory limit.
Input
containerregistrytype
-
Tipo di Registro contenitori
string
. Obbligatorio quando command != logout
. Valori consentiti: Azure Container Registry
, Container Registry
. Valore predefinito: Azure Container Registry
.
Specifica il Registro Azure Container per connettersi usando una connessione al servizio di Azure. Selezionare un Registro Azure Container per connettersi a un Docker Hub o a qualsiasi altro registro contenitori privato.
addBaseImageData
-
Aggiungere metadati dell'immagine di base alle immagini
boolean
. Valore predefinito: true
.
Il valore predefinito aggiunge dati di immagine di base, ad esempio il nome dell'immagine di base e il digest, per facilitare la tracciabilità. È possibile rifiutare esplicitamente questo comportamento predefinito impostando questo valore su false
.
dockerRegistryEndpoint
-
Connessione del servizio del Registro di sistema Docker
string
. facoltativo. Usare quando containerregistrytype = Container Registry && command != logout
.
Specifica una connessione al servizio del Registro di sistema Docker. Obbligatorio per i comandi che eseguono l'autenticazione usando un Registro di sistema.
azureSubscriptionEndpoint
-
Sottoscrizione di Azure
string
. facoltativo. Usare quando containerregistrytype = Azure Container Registry && command != logout
.
Specifica una sottoscrizione di Azure.
azureContainerRegistry
-
Registro Azure Container
string
. facoltativo. Usare quando containerregistrytype = Azure Container Registry && command != logout
.
Specifica un Registro Azure Container nella sottoscrizione di Azure selezionata. L'immagine del contenitore viene compilata e eseguita il push in questo registro contenitori.
command
-
Comando
string
. Obbligatorio. Valori consentiti: Build an image
(build), (tag), Tag image
Push an image
(push), (run), Run an image
login
, logout
. Valore predefinito: Build an image
.
Specifica il comando docker da eseguire.
dockerFile
-
Dockerfile
string
. Obbligatorio quando command = Build an image || command = build
. Valore predefinito: **/Dockerfile
.
Specifica il percorso del file Docker. L'attività usa il primo file docker che trova per compilare l'immagine.
arguments
-
Argomenti
string
. facoltativo. Usare quando command != login && command != logout
.
Specifica argomenti aggiuntivi da passare al client docker. L'uso del valore buildAndPush
nel parametro di comando ignora la proprietà argomenti.
arguments
-
Argomenti
string
. facoltativo. Usare quando command != Run an image && command != run && command != login && command != logout
.
Specifica argomenti aggiuntivi da passare al client docker. L'uso del valore buildAndPush
nel parametro di comando ignora la proprietà argomenti.
pushMultipleImages
-
Eseguire il push di più immagini
boolean
. facoltativo. Usare quando command = Push an image || command = push
. Valore predefinito: false
.
Specifica un elenco in un file di testo di immagini Docker da eseguire il push. Elencare ogni nome immagine nel formato Imagename1:tag1
in una riga separata. Elencare un nome di immagine senza tag, ad esempio Imagename2
, esegue il push di tutti i tag nel Imagename2
contenitore.
tagMultipleImages
-
Contrassegna più immagini
boolean
. facoltativo. Usare quando command = Tag image || command = tag
. Valore predefinito: false
.
Specifica un elenco di più tag di immagine e immagini Docker da contrassegnare in un file di testo. Elencare ogni nome immagine nel formato Imagename1:tag1
in una riga separata. Le immagini elencate senza un tag vengono Imagename2
contrassegnate come più recenti per impostazione predefinita.
imageName
-
Nome immagine
string
. Obbligatorio quando command = Build an image || command = build || command = Run an image || command = run || pushMultipleImages = false || tagMultipleImages = false
. Valore predefinito: $(Build.Repository.Name):$(Build.BuildId)
.
Specifica il nome dell'immagine Docker per compilare, eseguire o eseguire.
imageNamesPath
-
Percorso nomi immagine
string
. Obbligatorio quando tagMultipleImages = true || pushMultipleImages = true
.
Specifica il percorso di un file di testo contenente i nomi delle immagini Docker per contrassegnare o eseguire il push. Elencare ogni nome immagine in una riga separata.
qualifyImageName
-
Nome immagine qualificato
boolean
. facoltativo. Usare quando command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push || command = Run an image || command = run
. Valore predefinito: true
.
Specifica un nome immagine qualificato con il nome host del servizio del registro Docker.
qualifySourceImageName
-
Nome immagine di origine qualificato
boolean
. facoltativo. Usare quando command = Tag image || command = tag
. Valore predefinito: false
.
Specifica un nome immagine qualificato con il nome host del servizio del registro Docker.
includeSourceTags
-
Includere tag di origine
boolean
. facoltativo. Usare quando command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push
. Valore predefinito: false
.
Specifica i tag Git da includere durante la compilazione o il push dell'immagine Docker.
includeLatestTag
-
Includere il tag più recente
boolean
. facoltativo. Usare quando command = Build an image || command = build
. Valore predefinito: false
.
Specifica se usare il tag più recente durante la compilazione dell'immagine Docker.
addDefaultLabels
-
Aggiungere etichette predefinite
boolean
. facoltativo. Usare quando addDefaultLabels = false
. Valore predefinito: true
.
Specifica se aggiungere metadati CI/CD all'immagine del contenitore usando etichette Docker, ad esempio repository, commit, compilazione e rilascio.
addDefaultLabels
-
Aggiungere etichette predefinite
boolean
. facoltativo. Usare quando command = Build an image || command = build
. Valore predefinito: true
.
Specifica se aggiungere metadati CI/CD all'immagine del contenitore usando etichette Docker, ad esempio repository, commit, compilazione e rilascio.
useDefaultContext
-
Usare il contesto di compilazione predefinito
boolean
. facoltativo. Usare quando command = Build an image || command = build
. Valore predefinito: true
.
Specifica l'aggiunta o la rimozione del contesto di compilazione alla directory contenente il file Docker.
buildContext
-
Contesto di compilazione
string
. facoltativo. Usare quando useDefaultContext = false
.
Specifica il percorso del contesto di compilazione.
imageDigestFile
-
File di digest delle immagini
string
. facoltativo. Usare quando command = Push an image || command = push
.
Specifica il percorso di un file creato e popolato con il digest completo dell'immagine Docker che è stato eseguito il push.
containerName
-
Nome contenitore
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica il nome del contenitore Docker da eseguire.
ports
-
Porte
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica le porte nel contenitore Docker da pubblicare nell'host. Elencare ogni host-port:container-port
associazione in una riga separata.
volumes
-
Volumi
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica i volumi da montare dall'host. Elencare ognuno host-dir:container-dir
in una riga separata.
envVars
-
Variabili di ambiente
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica le variabili di ambiente per il contenitore Docker. Elencare ogni name=value
coppia in una riga separata.
workingDirectory
-
Directory di lavoro
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica la directory di lavoro per il contenitore Docker.
entrypointOverride
-
Override del punto di ingresso
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica se eseguire l'override del punto di ingresso predefinito per il contenitore Docker.
containerCommand
-
Comando Contenitore
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica un comando di esecuzione Docker. Il comando docker run crea prima un livello contenitore scrivibile sull'immagine specificata e quindi lo avvia usando il comando di esecuzione specificato. Ad esempio, se l'immagine contiene una semplice applicazione Web Python Flask, è possibile specificare python app.py
per avviare l'applicazione Web.
containerCommand
-
Comando
string
. facoltativo. Usare quando command = Run an image || command = run
.
Specifica un comando di esecuzione Docker. Il comando docker run crea prima un livello contenitore scrivibile sull'immagine specificata e quindi lo avvia usando il comando di esecuzione specificato. Ad esempio, se l'immagine contiene una semplice applicazione Web Python Flask, è possibile specificare python app.py
per avviare l'applicazione Web.
runInBackground
-
Esecuzione in background
boolean
. facoltativo. Usare quando command = Run an image || command = run
. Valore predefinito: true
.
Specifica se eseguire il contenitore Docker in background.
restartPolicy
-
Criteri di riavvio
string
. Obbligatorio quando runInBackground = true
. Valori consentiti: no
, onFailure
(Errore), always
, unlessStopped
(a meno che non sia stato arrestato). Valore predefinito: no
.
Specifica quando eseguire un criterio di riavvio.
maxRestartRetries
-
Tentativi di riavvio massimo
string
. facoltativo. Usare quando runInBackground = true && restartPolicy = onFailure
.
Specifica il numero massimo di tentativi di riavvio del daemon Docker.
dockerHostEndpoint
-
Connessione del servizio host Docker
string
. facoltativo. Usare quando command != login && command != logout
.
Specifica una connessione al servizio host Docker. Impostazione predefinita dell'host dell'agente.
enforceDockerNamingConvention
-
Forzare il nome dell'immagine a seguire la convenzione di denominazione Docker
boolean
. facoltativo. Usare quando command != login && command != logout
. Valore predefinito: true
.
Il valore predefinito modifica il nome dell'immagine Docker in base alle convenzioni di denominazione di Docker. Ad esempio, convertire i caratteri maiuscoli in minuscolo e rimuovere spazi.
memoryLimit
-
Limite di memoria
string
. facoltativo. Usare quando command != login && command != logout
.
Specifica la quantità massima di memoria disponibile per il contenitore come intero con suffisso facoltativi come 2GB
.
Opzioni di controllo delle attività
Tutte le attività dispongono di opzioni di controllo oltre ai relativi input attività. Per altre informazioni, vedere Opzioni di controllo e proprietà comuni delle attività.
Variabili di output
Questa attività definisce le variabili di output seguenti, che è possibile usare nei passaggi, nei processi e nelle fasi downstream.
DockerOutput
Archivia l'output del comando docker
DockerOutputPath
Percorso del file che contiene l'output del comando di compilazione.
Questa attività definisce le variabili di output seguenti, che è possibile usare nei passaggi, nei processi e nelle fasi downstream.
DockerOutput
Archivia l'output del comando docker
Commenti
Docker@2 è una versione più recente di questa attività che semplifica l'attività rimuovendo gli input che possono essere passati come argomenti al comando.
Requisiti
Requisito | Descrizione |
---|---|
Tipi di pipeline | YAML, build classica, versione classica |
Viene eseguito in | Agente, DeploymentGroup |
Richieste | Nessuno |
Capabilities | Questa attività non soddisfa le richieste per le attività successive nel processo. |
Restrizioni dei comandi | Qualsiasi |
Variabili impostabili | Qualsiasi |
Versione agente | Tutte le versioni dell'agente supportate. |
Categoria attività | Compilazione |