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: <
Why not copy in your Dockerfile all 3 config files, and then docker run -e config=file1 (or file2 or file3) and use the value of config environment variable to get the required config file .Check the doc
http://docs.docker.com/reference/commandline/cli/#run
You can also use the --env-file=[] Read in a line delimited file of environment variables of the docker run command.
You can check that environment variable is available with docker run -it -e mytag=abc123 ubuntu:latest env | grep mytag shows mytag=abc123