Windows Temp Docker Builder folder


I’m trying to run a builder command from a vsts agent and it keeps prefixing the path above.

[command]“C:\Program Files\Docker\Docker\Resources\bin\docker.exe” build -f C:\agent_work\1\s\src\Api\Dockerfile --build-arg source=C:\agent_work\1\a -t 2481:release -t 2481:ServiceDirectory -t 2481 C:\agent_work\1\s\src\Directory.Api

I run it locally as well in the same form. And it constantly fails, i’m trying to simply pass the location of the published files to use in the copy.

FROM microsoft/aspnetcore:1.1.2
ARG source
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT [“dotnet”, “Directory.API.dll”]

The above is the docker file? I can’t figure this out for the life of me, it only ever works if i go.

$ docker build ./

Why can’t i just simply pass over the source argument?

I’m experiencing the same thing with an Asp.Net Framework project.

Did you happen to work out what the problem was…?

IT was the way that the vsts agent could cope with the workspace, i simply just changed the output directory via

dotnet project.cspj -out publish and passed in source=publish to the agent to build the image. It then found everything properly. It tends to have a problem with using specific directories outside it’s base workspace.

The vsts agents use parent directories, not nested. So it didn’t like that. Everything was built and published via the src pull instead of a staging directory.

I can imagine the same thing with an aspnet

msbuild /p:outputdir=publish