Shell
$ ls -l | grep Dockerfile | xargs -I {} docker build . --file {}
Use xargs to loop over stdin and run multiple commands in sequence. This example will run docker build for each Dockerfile found in the current directory.