docker cant find file in parent folder?

  docker, dockerfile

I have a problem where docker build can’t find my files and I’ve tried many folder references but I cant get my head around the folder structure. No matter what its wrong.

This is my project (slimmed down) structure:

enter image description here

This is my docker file:

# pull official base image
FROM AS build-env

# set working directory

# add app csprojfiles
COPY ./myapi.sln .

and this is the error:

failed to compute cache key: "/myapi.sln" not found: not found

I’ve tried COPY ../myapi.sln . and simply myapi.sln but its not found no matter what. Im running command docker build web.api/ from the parent myapi folder in command prompt.

Source: Docker Questions