From a2f53d1dc77142df03003d105b3bec1fd8882bb4 Mon Sep 17 00:00:00 2001 From: Adam Buckingham Date: Mon, 14 Aug 2023 14:04:22 -0400 Subject: [PATCH] Adding argument to Dockerfile for argument since NODE_ENV not set causes issues. --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4c90464..2081077 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,13 @@ RUN touch winston.log.json RUN npm cache clean --force +# Get environment argument passed in +ARG environment +ARG default_environment=development + +# Set NODE_ENV environment variable +ENV NODE_ENV=${environment:-$default_environment} + # Check environment and install dependencies # Note: When the NODE_ENV environment variable is set to 'production' npm # will not install modules listed in devDependencies