docker-compose build requirements.txt not update

I want to use docker to publish my Django project.
I have create a docker-compose.yml file, a .dockerignore and a Dockerfile like this one:

FROM python:3.6-alpine
RUN apk add --no-cache gcc musl-dev linux-headers
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
RUN mkdir /code
COPY requirements.txt /code
WORKDIR /code
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . .

CMD ["python", "manage.py", "runserver", "127.0.0.1:8000"]

When I first run docker compose I get an error installing a package contained in my requirements.txt file, at this point, I remove the packages from my file and run:

docker-compose down
docker-compose build --no-cache

here my docker-compose.yml

version: '3'

networks:
  mynetwork:
    driver: bridge

services:

  db:
    image: postgres
    restart: always
    ports:
      - "5432:5432"
    networks:
      - mynetwork
    environment:
      POSTGRES_USER: myuser
      POSTGRES_PASSWORD: mypass
      POSTGRES_DB: mydb
    volumes:
      - ./data:/var/lib/postgresql/data

  web:
    build: .
    networks:
      - mynetwork

    volumes:
      - .:/DEV

    ports:
      - "8000:8000"

    depends_on:
      - db

When I proceed to execute pip install -r requirements.txt there is again the package in file that execute causing an issue… how can I clear the cache and use my new saved requirements.txt file?

Source: StackOverflow