I'm trying to write a dockerfile for my node application. I have two directories "backend" and "docker", one for the backend and the other for docker. How can i copy the package.json file that isn't in my docker director?
My Dockefile:
FROM node:latest
WORKDIR /app
COPY ../backend/package.json .
RUN npm install
COPY ../backend .
EXPOSE 8000
CMD ["yarn", "start:dev"]
Error log: COPY ../backend .
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::g8h1qak04dvflrufe6k26qh1c: "/backend": not found
PS: I'm running the "docker build -t test ." in the directory project/docker