I want to create Dockerfile that will be able to build three different images (one at the moment). Those images differs only in configuration files.
I was trying: <
If you want 3 different images, use 3 different Dockerfiles. The naming issue is annoying, but you can write a helper script that simply copies files and calls docker build
e.g.
cp Dockerfile-cfg1 Dockerfile
docker build -t "cfg1" .
cp Dockerfile-cfg2 Dockerfile
docker build -t "cfg2" .
However, as @user2915097 suggests, a better solution is probably to have a single image and choose the config at run-time. This means less overhead of looking after and maintaining multiple images.