Bug
Type: here
Enter Task Name: Docker@2
Self hosted agent container running in Azure Kubernetes.
Agent - Private:
When I force a job to run on the self hosted agent (instead of azure pipelines) the docker task fails.
##[debug]Evaluating condition for step: 'Login to ACR'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Login to ACR
==============================================================================
Task : Docker
Description : Build or push Docker images, login or logout, or run a Docker command
Version : 2.162.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/docker
==============================================================================
##[debug]agent.TempDirectory=/vsts/agent/_work/_temp
##[debug]loading inputs and endpoints
##[debug]loading INPUT_CONTAINERREGISTRY
##[debug]loading INPUT_COMMAND
##[debug]loading INPUT_DOCKERFILE
##[debug]loading INPUT_BUILDCONTEXT
##[debug]loading INPUT_TAGS
##[debug]loading INPUT_ADDPIPELINEDATA
##[debug]loading ENDPOINT_AUTH_5f3dd897-2488-4065-8dca-cd953635fa41
##[debug]loading ENDPOINT_AUTH_SCHEME_5f3dd897-2488-4065-8dca-cd953635fa41
##[debug]loading ENDPOINT_AUTH_PARAMETER_5f3dd897-2488-4065-8dca-cd953635fa41_LOGINSERVER
##[debug]loading ENDPOINT_AUTH_PARAMETER_5f3dd897-2488-4065-8dca-cd953635fa41_ROLE
##[debug]loading ENDPOINT_AUTH_PARAMETER_5f3dd897-2488-4065-8dca-cd953635fa41_SCOPE
##[debug]loading ENDPOINT_AUTH_PARAMETER_5f3dd897-2488-4065-8dca-cd953635fa41_SERVICEPRINCIPALID
##[debug]loading ENDPOINT_AUTH_PARAMETER_5f3dd897-2488-4065-8dca-cd953635fa41_TENANTID
##[debug]loading ENDPOINT_AUTH_PARAMETER_5f3dd897-2488-4065-8dca-cd953635fa41_SERVICEPRINCIPALKEY
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
##[debug]loaded 18
##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]check path : /vsts/agent/_work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.162.0/task.json
##[debug]adding resource file: /vsts/agent/_work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.162.0/task.json
##[debug]system.culture=en-US
##[debug]containerRegistry=5f3dd897-2488-4065-8dca-cd953635fa41
##[debug]5f3dd897-2488-4065-8dca-cd953635fa41 data registrytype = ACR
##[debug]5f3dd897-2488-4065-8dca-cd953635fa41 auth param loginServer = ***
##[debug]Reading the acr registry in old versions
##[debug]Reading the acr registry in kubernetesV1
##[debug]5f3dd897-2488-4065-8dca-cd953635fa41 auth param serviceprincipalid = ***
##[debug]5f3dd897-2488-4065-8dca-cd953635fa41 auth param serviceprincipalkey = ***
##[debug]System.ServerType=Hosted
##[debug]Processed: ##vso[task.setvariable variable=CONTAINER_USERNAME;issecret=true;]***
##[debug]Processed: ##vso[task.setvariable variable=CONTAINER_PASSWORD;issecret=true;]***
##[debug]command=login
##[debug]which 'docker'
##[debug]not found
##[debug]task result: Failed
##[error]Unhandled: Unable to locate executable file: 'docker'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
##[debug]Processed: ##vso[task.issue type=error;]Unhandled: Unable to locate executable file: 'docker'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Unable to locate executable file: 'docker'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
##[section]Finishing: Login to ACR
Logs from the Initilise (install)
##[section]Starting: Initialize job
Agent name: 'vstsagent-6d8c57749f-592tx'
Agent machine name: 'vstsagent-6d8c57749f-592tx'
Current agent version: '2.163.1'
Agent running as: 'root'
##[debug]Primary repository: DrawboardLtd/bullclip-sourcefile-processing. repository type: GitHub
Prepare build directory.
##[debug]Creating build directory: '/vsts/agent/_work/1'
##[debug]Delete existing artifacts directory: '/vsts/agent/_work/1/a'
##[debug]Creating artifacts directory: '/vsts/agent/_work/1/a'
##[debug]Delete existing test results directory: '/vsts/agent/_work/1/TestResults'
##[debug]Creating test results directory: '/vsts/agent/_work/1/TestResults'
##[debug]Creating binaries directory: '/vsts/agent/_work/1/b'
##[debug]Creating source directory: '/vsts/agent/_work/1/s'
Set build variables.
Download all required tasks.
Downloading task: InstallSSHKey (0.156.0)
##[debug]Task 'InstallSSHKey' has been downloaded into '/vsts/agent/_work/_tasks/InstallSSHKey_5c9af2eb-5fc5-42dc-9b91-dc234a8c4400/0.156.0'.
Downloading task: Docker (2.162.0)
##[debug]Task 'Docker' has been downloaded into '/vsts/agent/_work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.162.0'.
Downloading task: KubernetesManifest (0.162.1)
##[debug]Task 'KubernetesManifest' has been downloaded into '/vsts/agent/_work/_tasks/KubernetesManifest_dee316a2-586f-4def-be79-488a1f503dfe/0.162.1'.
##[debug]Task 'Patch' has following condition: 'ne(variables['workspace'], '')'.
##[debug]Parsing expression: <ne(variables['workspace'], '')>
##[debug]ne
##[debug](
##[debug]..variables
##[debug]..[
##[debug]....'workspace'
##[debug]..]
##[debug]..,
##[debug]..''
##[debug])
##[debug]Log plugin 'TestFilePublisherPlugin' is disabled.
Plugin: 'Test Result Parser plugin' is running in background.
Plugin: 'Test File Publisher plugin' is running in background.
Start tracking orphan processes.
##[section]Finishing: Initialize job
So I apparently needed to be more selective with my container and needed a docker enabled container.
I have the exact same issue.. what do you mean by a docker enabled container?? How did you fix this?
Most helpful comment
I have the exact same issue.. what do you mean by a docker enabled container?? How did you fix this?