Prebuild hook

Prevent .env files from being built into your docker container with dotenvx's pre-build command.

Installation

Add to your Dockerfile.

RUN curl -fsS https://dotenvx.sh/ | sh

...

RUN dotenvx prebuild
CMD ["dotenvx", "run", "--", "node", "index.js"]

We recommend placing it (dotenvx prebuild) on the last line or second to last line of your Dockerfile.

Manual Usage

If you prefer not to add it to your Dockerfile you can manually run it before building your docker image.

dotenvx prebuild