In the line above that one, I am setting the working directory (inside the container) to /app (WORKDIR /app) and then copying everything from build context root (which is the current folder on my host machine in this case: .) to the target folder inside the container. Since the working directory is set to /app the . in the COPY instruction copies everything to that folder.
If I removed the WORKDIR, I would also need to update the COPY instruction to read COPY . /app
COPY . /app
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.