Q: Wait and Chmod in Azure DevOps Pipeline-built container
ardalis opened this issue · 2 comments
ardalis commented
I'm trying to run this dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /app
COPY . ./
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.5.0/wait /wait
#RUN chmod +x /wait
RUN /bin/bash -c 'ls -la /wait; chmod +x /wait; ls -la /wait'
CMD /wait && dotnet test --logger trx --results-directory /var/temp /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura && mv /app/tests/Ardalis.Specification.UnitTests/coverage.cobertura.xml /var/temp/coverage.unit.cobertura.xml && mv /app/tests/Ardalis.Specification.IntegrationTests/coverage.cobertura.xml /var/temp/coverage.integration.cobertura.xml
It works fine on my local Windows machine (with just the RUN chmod or the RUN /bin/bash version). But when I run the script as part of a build in Azure Pipelines I get this error:
I don't think this is necessarily related to this tool, but I wonder if you have any idea why this would work locally but not from Azure DevOps? It should behave the same in both places - that's part of the beauty of docker, right?
Thanks for any ideas you may have.