I have the following file structure:
Dockerfile:
# syntax=docker/dockerfile:1
FROM python:3.8-slim-buster
WORKDIR /home/pos
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY /src /src
CMD ["python", "src/manage.py", "runserver"]
I expect that the content of the src/ folder will be copied to the same path in the container (home/pos/src/) but only the requirements.txt are copied to that path, the content of the /src folder is being copied to the "root" (/), so I need to change the command to:
COPY /src /home/pos/src
It is necessary to set the WORKDIR for each command?