I'm trying to set up a Docker development environment on Windows. I have a code directory structure like so:
project/
node-app/
react-app-1/
react-app-2/
shared/
node-app
, react-app-1
and react-app-2
all depend upon the code within shared
. So, I was thinking of having a Dockerfile
in each of the apps, with something like this:
FROM node:10.0
WORKDIR /app
COPY ../ .
WORKDIR /app/node-app
RUN npm install
However, that doesn't work - Docker gives me an error saying that it's a Forbidden path outside the build context: ../
.
What is the best way to resolve this problem? I'm looking at setting up some sort of Docker Compose after I get this sorted (once again for local development), so my ideal solution would keep that in mind.