Docker@1 - Docker v1 작업

Docker 이미지를 빌드, 태그 지정, 푸시 또는 실행하거나 Docker 명령을 실행합니다. Docker 또는 Azure Container Registry에서 이 작업을 사용합니다.

참고

Docker@2 명령에 인수로 전달할 수 있는 입력을 제거하여 작업을 간소화하는 이 작업의 최신 버전입니다.

Syntax

# 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.

입력

containerregistrytype - 컨테이너 레지스트리 유형
string. 필요한 경우 command != logout입니다. 허용되는 값: Azure Container Registry, Container Registry. 기본값은 Azure Container Registry입니다.

Azure 서비스 연결을 사용하여 연결할 Azure Container Registry 지정합니다. Azure Container Registry 선택하여 Docker Hub 또는 다른 프라이빗 컨테이너 레지스트리에 연결합니다.


addBaseImageData - 이미지에 기본 이미지 메타데이터 추가
boolean. 기본값은 true입니다.

기본값은 추적 가능성을 돕기 위해 기본 이미지 이름 및 다이제스트와 같은 기본 이미지 데이터를 추가합니다. 이 값을 로 설정하여 이 기본 동작을 옵트아웃할 false수 있습니다.


dockerRegistryEndpoint - Docker 레지스트리 서비스 연결
string. 선택 사항입니다. 를 사용하는 경우 containerregistrytype = Container Registry && command != logout를 사용합니다.

Docker 레지스트리 서비스 연결을 지정합니다. 레지스트리를 사용하여 인증하는 명령에 필요합니다.


azureSubscriptionEndpoint - Azure 구독
string. 선택 사항입니다. 를 사용하는 경우 containerregistrytype = Azure Container Registry && command != logout를 사용합니다.

Azure 구독을 지정합니다.


azureContainerRegistry - Azure Container Registry
string. 선택 사항입니다. 를 사용하는 경우 containerregistrytype = Azure Container Registry && command != logout를 사용합니다.

선택한 Azure 구독의 Azure Container Registry 지정합니다. 컨테이너 이미지가 빌드되고 이 컨테이너 레지스트리에 푸시됩니다.


command - 명령
string. 필수 요소. 허용되는 값: Build an image (build), Tag image (tag), Push an image (push), Run an image (run), login, logout. 기본값은 Build an image입니다.

실행할 docker 명령을 지정합니다.


dockerFile - Dockerfile
string. 필요한 경우 command = Build an image || command = build입니다. 기본값은 **/Dockerfile입니다.

Docker 파일의 경로를 지정합니다. 작업은 이미지를 빌드하기 위해 찾은 첫 번째 docker 파일을 사용합니다.


arguments - 인수
string. 선택 사항입니다. 를 사용하는 경우 command != login && command != logout를 사용합니다.

docker 클라이언트에 전달할 추가 인수를 지정합니다. 명령 매개 변수의 값을 buildAndPush 사용하면 인수 속성이 무시됩니다.


arguments - 인수
string. 선택 사항입니다. 를 사용하는 경우 command != Run an image && command != run && command != login && command != logout를 사용합니다.

docker 클라이언트에 전달할 추가 인수를 지정합니다. 명령 매개 변수의 값을 buildAndPush 사용하면 인수 속성이 무시됩니다.


pushMultipleImages - 여러 이미지 푸시
boolean. 선택 사항입니다. 를 사용하는 경우 command = Push an image || command = push를 사용합니다. 기본값은 false입니다.

푸시할 Docker 이미지의 텍스트 파일에 있는 목록을 지정합니다. 각 이미지 이름을 별도의 줄의 형식 Imagename1:tag1 으로 나열합니다. 예를 들어 Imagename2태그가 없는 이미지 이름을 나열하면 컨테이너의 모든 태그가 Imagename2 푸시됩니다.


tagMultipleImages - 여러 이미지 태그 지정
boolean. 선택 사항입니다. 를 사용하는 경우 command = Tag image || command = tag를 사용합니다. 기본값은 false입니다.

텍스트 파일에서 태그를 지정할 여러 이미지 태그 및 Docker 이미지 목록을 지정합니다. 각 이미지 이름을 별도의 줄의 형식 Imagename1:tag1 으로 나열합니다. 태그 Imagename2 없이 나열된 이미지는 기본적으로 최신 으로 태그가 지정됩니다.


imageName - 이미지 이름
string. 필요한 경우 command = Build an image || command = build || command = Run an image || command = run || pushMultipleImages = false || tagMultipleImages = false입니다. 기본값은 $(Build.Repository.Name):$(Build.BuildId)입니다.

빌드, 푸시 또는 실행할 Docker 이미지의 이름을 지정합니다.


imageNamesPath - 이미지 이름 경로
string. 필요한 경우 tagMultipleImages = true || pushMultipleImages = true입니다.

태그를 지정하거나 푸시할 Docker 이미지의 이름이 포함된 텍스트 파일의 경로를 지정합니다. 각 이미지 이름을 별도의 줄에 나열합니다.


qualifyImageName - 이미지 이름 한정
boolean. 선택 사항입니다. 를 사용하는 경우 command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push || command = Run an image || command = run를 사용합니다. 기본값은 true입니다.

Docker 레지스트리 서비스 연결의 호스트 이름을 사용하여 정규화된 이미지 이름을 지정합니다.


qualifySourceImageName - 원본 이미지 이름 한정
boolean. 선택 사항입니다. 를 사용하는 경우 command = Tag image || command = tag를 사용합니다. 기본값은 false입니다.

Docker 레지스트리 서비스 연결의 호스트 이름을 사용하여 정규화된 이미지 이름을 지정합니다.


includeSourceTags - 원본 태그 포함
boolean. 선택 사항입니다. 를 사용하는 경우 command = Build an image || command = build || command = Tag image || command = tag || command = Push an image || command = push를 사용합니다. 기본값은 false입니다.

Docker 이미지를 빌드하거나 푸시할 때 포함할 Git 태그를 지정합니다.


includeLatestTag - 최신 태그 포함
boolean. 선택 사항입니다. 를 사용하는 경우 command = Build an image || command = build를 사용합니다. 기본값은 false입니다.

Docker 이미지를 빌드할 때 최신 태그를 사용할지 여부를 지정합니다.


addDefaultLabels - 기본 레이블 추가
boolean. 선택 사항입니다. 를 사용하는 경우 addDefaultLabels = false를 사용합니다. 기본값은 true입니다.

리포지토리, 커밋, 빌드 및 릴리스 정보와 같은 Docker 레이블을 사용하여 컨테이너 이미지에 CI/CD 메타데이터를 추가할지 여부를 지정합니다.


addDefaultLabels - 기본 레이블 추가
boolean. 선택 사항입니다. 를 사용하는 경우 command = Build an image || command = build를 사용합니다. 기본값은 true입니다.

리포지토리, 커밋, 빌드 및 릴리스 정보와 같은 Docker 레이블을 사용하여 컨테이너 이미지에 CI/CD 메타데이터를 추가할지 여부를 지정합니다.


useDefaultContext - 기본 빌드 컨텍스트 사용
boolean. 선택 사항입니다. 를 사용하는 경우 command = Build an image || command = build를 사용합니다. 기본값은 true입니다.

Docker 파일이 포함된 디렉터리에 빌드 컨텍스트를 추가하거나 제거하도록 지정합니다.


buildContext - 빌드 컨텍스트
string. 선택 사항입니다. 를 사용하는 경우 useDefaultContext = false를 사용합니다.

빌드 컨텍스트의 경로를 지정합니다.


imageDigestFile - 이미지 다이제스트 파일
string. 선택 사항입니다. 를 사용하는 경우 command = Push an image || command = push를 사용합니다.

푸시된 Docker 이미지의 전체 이미지 리포지토리 다이제스트로 만들어지고 채워진 파일의 경로를 지정합니다.


containerName - 컨테이너 이름
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

실행할 Docker 컨테이너의 이름을 지정합니다.


ports - 포트
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

호스트에 게시할 Docker 컨테이너의 포트를 지정합니다. 각 host-port:container-port 바인딩을 별도의 줄에 나열합니다.


volumes - 볼륨
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

호스트에서 탑재할 볼륨을 지정합니다. 각각 host-dir:container-dir 을 별도의 줄에 나열합니다.


envVars - 환경 변수
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

Docker 컨테이너의 환경 변수를 지정합니다. 각 name=value 쌍을 별도의 줄에 나열합니다.


workingDirectory - 작업 디렉터리
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

Docker 컨테이너의 작업 디렉터리를 지정합니다.


entrypointOverride - 진입점 재정의
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

Docker 컨테이너의 기본 진입점을 재정의할지 여부를 지정합니다.


containerCommand - 컨테이너 명령
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

Docker 실행 명령을 지정합니다. docker run 명령은 먼저 지정된 이미지 위에 쓰기 가능한 컨테이너 계층을 만든 다음 지정된 실행 명령을 사용하여 시작합니다. 예를 들어 이미지에 간단한 Python Flask 웹 애플리케이션이 포함된 경우 웹 애플리케이션을 시작하도록 지정할 python app.py 수 있습니다.


containerCommand - 명령
string. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다.

Docker 실행 명령을 지정합니다. docker run 명령은 먼저 지정된 이미지 위에 쓰기 가능한 컨테이너 계층을 만든 다음 지정된 실행 명령을 사용하여 시작합니다. 예를 들어 이미지에 간단한 Python Flask 웹 애플리케이션이 포함된 경우 웹 애플리케이션을 시작하도록 지정할 python app.py 수 있습니다.


runInBackground - 백그라운드에서 실행
boolean. 선택 사항입니다. 를 사용하는 경우 command = Run an image || command = run를 사용합니다. 기본값은 true입니다.

백그라운드에서 Docker 컨테이너를 실행할지 여부를 지정합니다.


restartPolicy - 정책 다시 시작
string. 필요한 경우 runInBackground = true입니다. 허용되는 값: no, onFailure (실패 시), always, unlessStopped (중지되지 않는 한). 기본값은 no입니다.

다시 시작 정책을 실행할 시기를 지정합니다.


maxRestartRetries - 최대 다시 시작 다시 시도
string. 선택 사항입니다. 를 사용하는 경우 runInBackground = true && restartPolicy = onFailure를 사용합니다.

Docker 디먼이 시도하는 최대 다시 시작 다시 시도 횟수를 지정합니다.


dockerHostEndpoint - Docker 호스트 서비스 연결
string. 선택 사항입니다. 를 사용하는 경우 command != login && command != logout를 사용합니다.

Docker 호스트 서비스 연결을 지정합니다. 기본값은 에이전트의 호스트입니다.


enforceDockerNamingConvention - Docker 명명 규칙을 따르도록 이미지 이름 강제 적용
boolean. 선택 사항입니다. 를 사용하는 경우 command != login && command != logout를 사용합니다. 기본값은 true입니다.

기본값은 Docker 명명 규칙에 따라 Docker 이미지 이름을 수정합니다. 예를 들어 대문자를 소문자로 변환하고 공백을 제거합니다.


memoryLimit - 메모리 제한
string. 선택 사항입니다. 를 사용하는 경우 command != login && command != logout를 사용합니다.

와 같은 2GB선택적 접미사가 있는 정수로 컨테이너에 사용할 수 있는 최대 메모리 양을 지정합니다.


작업 제어 옵션

모든 작업에는 작업 입력 외에 제어 옵션이 있습니다. 자세한 내용은 컨트롤 옵션 및 일반적인 작업 속성을 참조하세요.

출력 변수

이 작업은 다운스트림 단계, 작업 및 단계에서 사용할 수 있는 다음 출력 변수를 정의합니다.

DockerOutput
docker 명령의 출력을 저장합니다.

DockerOutputPath
빌드 명령의 출력을 포함하는 파일의 경로입니다.

이 작업은 다운스트림 단계, 작업 및 단계에서 사용할 수 있는 다음 출력 변수를 정의합니다.

DockerOutput
docker 명령의 출력을 저장합니다.

설명

Docker@2 명령에 인수로 전달할 수 있는 입력을 제거하여 작업을 간소화하는 이 작업의 최신 버전입니다.

요구 사항

요구 사항 Description
파이프라인 유형 YAML, 클래식 빌드, 클래식 릴리스
실행 중 에이전트, DeploymentGroup
요청 없음
Capabilities 이 작업은 작업의 후속 작업에 대한 요구를 충족하지 않습니다.
명령 제한 사항 모두
설정 가능한 변수 모두
에이전트 버전 지원되는 모든 에이전트 버전.
작업 범주 빌드

추가 정보