docker build -t nginx:stable .
I suppose you should choose a different tag name for the resulting image; the one you chose conflicts with the base image you're using.
Try something like docker build --tag myown-ngingx:stable .
docker build --tag myown-ngingx:stable .