I need to build a docker image and need to copy a file from the different folder which don't have docker file
Basically this is my dir structure
C:\AGENT\_WORK\2
├───a
│ └───s
└───s
└───Docker
Dockerfile
so I need to copy all files from C:\AGENT\_WORK\2\a\s
but my docker file is in C:\AGENT\_WORK\2\s\Docker\Dockerfile
I'm building the image by this command, I have given context as C:\agent_work`
docker build -t testapp:latest -f C:\AGENT\_WORK\2\s\Docker\Dockerfile C:\agent\_work
Dockerfile:
FROM mcr.microsoft.com/windows/nanoserver:1709 AS base
WORKDIR /app
ARG BINARY_SRC
EXPOSE 80
EXPOSE 443
ADD C:\AGENT\_WORK\2\a\s .
RUN ls
FROM base AS final
ENTRYPOINT ["dotnet", "TestApp.dll"]
Error:
ADD failed: CreateFile \?\C:\ProgramData\Docker\tmp\docker-builder076789264\agent_work: The system cannot find the path specified.