Dockerfile was an old dockerfile when it was modified and build.

  docker, question

The dockerfile was still an old dockerfile when it was build after modification. how did you solve it?

Just delete the old container that has been build, and the new dockerfile will be used for reconstruction.