Security - prompting for passwords during build and run?

Starting to test with Docker. We are testing with building a product that requires some passwords during the Build phase and again when it is started each time. Is there any way for the build and run commands to prompt for passwords?

My understanding is that if the passwords are hard-coded into the image, they may be deconstructed or the image may be launched by someone that gains access to it.

No, docker build is non-interactive.

So far, the only workaround I can think of, is to use one docker run container to build a second image, which you then push to users.