Probably you have a file in your build directory which was created by previous docker container runs (through mounted volumes). Erase those files before rebuilding the image.