Docker@1 - مهمة Docker v1

إنشاء صور Docker أو وضع علامة عليها أو دفعها أو تشغيلها أو تشغيل أمر Docker. استخدم هذه المهمة مع Docker أو سجل حاوية Azure.

ملاحظة

Docker@2 هو إصدار أحدث من هذه المهمة يبسط المهمة عن طريق إزالة المدخلات التي يمكن تمريرها كوسيطات إلى الأمر .

بناء الجملة

# 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 Container Registry للاتصال باستخدام اتصال خدمة Azure. حدد 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
string. ‏‏اختياري. استخدم عندما containerregistrytype = Azure Container Registry && command != logout.

يحدد Azure Container Registry في اشتراك Azure المحدد. يتم إنشاء صورة الحاوية ودفعها إلى سجل الحاوية هذا.


command - الامر
string. مطلوب القيم المسموح بها: Build an image (بناء)، Tag image (علامة)، Push an image (دفع)، Run an image (تشغيل)، 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.

يحدد علامات Git لتضمينها عند إنشاء صورة Docker أو دفعها.


includeLatestTag - تضمين أحدث علامة
boolean. ‏‏اختياري. استخدم عندما command = Build an image || command = build. القيمة الافتراضية: false.

يحدد ما إذا كان يجب استخدام أحدث علامة عند إنشاء صورة Docker.


addDefaultLabels - إضافة تسميات افتراضية
boolean. ‏‏اختياري. استخدم عندما addDefaultLabels = false. القيمة الافتراضية: true.

يحدد ما إذا كان يجب إضافة بيانات تعريف CI/CD إلى صورة الحاوية باستخدام تسميات Docker، مثل معلومات المستودع والتثبيت والبناء والإصدار.


addDefaultLabels - إضافة تسميات افتراضية
boolean. ‏‏اختياري. استخدم عندما command = Build an image || command = build. القيمة الافتراضية: true.

يحدد ما إذا كان يجب إضافة بيانات تعريف CI/CD إلى صورة الحاوية باستخدام تسميات Docker، مثل معلومات المستودع والتثبيت والبناء والإصدار.


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 أولا طبقة حاوية قابلة للكتابة فوق الصورة المحددة، ثم يبدأها باستخدام أمر التشغيل المحدد. على سبيل المثال، إذا كانت الصورة تحتوي على تطبيق ويب Python Flask بسيط، يمكنك تحديد python app.py لتشغيل تطبيق الويب.


containerCommand - الامر
string. ‏‏اختياري. استخدم عندما command = Run an image || command = run.

يحدد أمر تشغيل Docker. ينشئ أمر تشغيل docker أولا طبقة حاوية قابلة للكتابة فوق الصورة المحددة، ثم يبدأها باستخدام أمر التشغيل المحدد. على سبيل المثال، إذا كانت الصورة تحتوي على تطبيق ويب 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 daemon.


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 هو إصدار أحدث من هذه المهمة يبسط المهمة عن طريق إزالة المدخلات التي يمكن تمريرها كوسيطات إلى الأمر .

المتطلبات

المتطلبات الوصف
أنواع البنية الأساسية لبرنامج ربط العمليات التجارية YAML، الإصدار الكلاسيكي، الإصدار الكلاسيكي
يعمل على Agent, DeploymentGroup
المطالب بلا
القدرات لا تفي هذه المهمة بأي طلبات للمهام اللاحقة في الوظيفة.
قيود الأوامر أي
متغيرات Settable أي
إصدار الوكيل جميع إصدارات العامل المدعومة.
فئة المهمة البنية

راجع أيضًا