Compose Push Service throws the below error in my pipeline:
##[error]Unhandled: Failed find:
EACCES: permission denied, scandir '/home/vsts/work/1/s/data'
Pipeline YAML- I am using Docker Compose commands, the Build is working fine, its the push to ACR fails
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: ubuntu-latest
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: 'GUID'
imageRepository: 'strapiregimg'
containerRegistry: 'strapireg.azurecr.io'
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
tag: '$(Build.BuildId)'
enter code here
- task: DockerCompose@0
inputs:
containerregistrytype: 'Azure Container Registry'
azureSubscription: ''
azureContainerRegistry: '{"loginServer":"strapireg.azurecr.io", "id" : ""}'
dockerComposeFile: '**/docker-compose.yml'
action: 'Build services'
includeSourceTags: true
includeLatestTag: true
- task: DockerCompose@0
inputs:
containerregistrytype: 'Azure Container Registry'
azureSubscription: ''
azureContainerRegistry: '{"loginServer":"strapireg.azurecr.io", "id" : "'
dockerComposeFile: '**/docker-compose.yml'
action: 'Run services'
- task: DockerCompose@0
inputs:
containerregistrytype: 'Azure Container Registry'
azureSubscription: ''
azureContainerRegistry: '{"loginServer":"strapireg.azurecr.io", "id" : ""}'
dockerComposeFile: '**/docker-compose.yml'
action: 'Push services'
Error is on Azure Pipeline only, locally it works well
Posting the Answer based on PGautami comment and supporting the statement given by jessehouwing to help the other community members with related discussions.
When you are using Docker compose commands to Push services through ACR if you run docker run
command prior to docker push
it will help you in preventing from file locks so that the Push command works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.