0

Inside my Django project I have a directory for requirements that are separated for different environments which contains three files dev.txt, common.txt and prod.txt. in Dockerfile I just wanna copy only two of them dev.txt and common.txt into /app/requirements directory inside docker container in one go.

FROM python:3.9.15

WORKDIR /app

COPY /requirements/common.txt /requirements/dev.txt /requirements/

RUN pip install -r /requirements/dev.txt

COPY . /app

EXPOSE 8000

I have copied them in this way. but I think there is a better and more readable way. If you know a better way, please tell me.

1 Answers1

1

This looks like a duplicate of

COPY with docker but with exclusion