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 -sfS https://dotenvx.sh/install.sh | sh

...

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

We recommend placing it (dotenvx ext 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 ext prebuild