Mount doesn't seem to do anything, am I misunderstanding how it works?

I’ve been using doppler successfully for some time, injecting secrets into the environment via doppler run. I’m now trying to have it mount those secrets to a .env file, but it doesn’t seem to do anything at all. I expected an ephemeral .env to be created with the secrets. Is that not what mount does?

Hi @erquhart!

Welcome to the Doppler Community!

What it does is create a named pipe on the filesystem. This behaves similarly to a file, but isn’t actually one and your secrets aren’t actually stored on disk. Instead, when something tries reading the file a request is made behind the scenes to fetch the secrets from Doppler and that’s then returned as if the file were read as per usual. This named pipe will exist either as long as the wrapping Doppler CLI process is running or based on the limits you’ve imposed with the other --mount-* flags.

You should be able to see this on-disk by doing the following:

doppler run --mount .env -- sleep 300

Then open up another terminal session, browse to the directory you ran that command in and run cat .env. You should see all your secrets.

The goal of this is to provide an easy way to integrate with frameworks that have deep dotenv integration (i.e., where they automatically load .env files if they exist).

Let me know if you have any other questions!