I have the following directory structure
|-Dockerfile
|-README.md
|-angula.json
|-package.json
|-...
|-src
|-index.html
|-main.ts
|-...
|app
|-app.component.html
|...
Now I want that everything is copied into a container when it is starting up. For that I put the following content into the Dockerfile:
From node:12.15.0-alpine
RUN mkdir -p /app
WORKDIR /app
COPY package.json /app/
RUN ["npm","install"]
COPY . /app
EXPOSE 4200/tcp
CMD ["npm", "start", "--", "--host", "0.0.0.0", "--poll", "500"]
When I now build and run the Dockerfile, I have the following issue, that the directory src
and all its subdirectories are not copied.
When I run docker exec -it [container-name] sh
and then type sh
all files which are in the same directory as Dockerfile are there. However if I then go into the src
folder it is empty.
I would expect that with the COPY . /app
I am coping the complete folder and all its sub-directories to the container. Why is this not the case? What am I missing out?