title: Is it possible to mount a directory while building from Dockerfile?
body: <p>I'm trying to build a Docker image using the Dockerfile method. Minimizing the image size and number of layers is very important for this specific application. However, the rpm needed for installation is fairly large and I don't want to bake that into the image. It seems that if I use the ADD command in the Dockerfile, the rpm gets copied into the image as its own layer and there's no way to remove it after I'm done using it. To get around this, we're just running a container in interactive mode with the -v volume mounting option to share the folder containing the rpm, but not actually copying the rpm to the container. Is there any way to do something like the -v option while running the docker build command with Dockerfiles?</p>