diff --git a/ui/.dockerignore b/ui/.dockerignore index 72e9aa425..ac556e64f 100644 --- a/ui/.dockerignore +++ b/ui/.dockerignore @@ -4,4 +4,5 @@ node_modules npm-debug.log README.md .next -.git \ No newline at end of file +.git +.env.* diff --git a/ui/Dockerfile b/ui/Dockerfile index 2fbf1e4a1..60b884530 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -1,3 +1,6 @@ +ARG log_level=info +ARG console_mode=read-only + FROM registry.access.redhat.com/ubi9/nodejs-18 AS deps USER 0 WORKDIR /app @@ -19,8 +22,8 @@ COPY . . ARG backend_url=http://example ARG console_metrics_prometheus_url=http://example ARG nextauth_secret=examplesecret -ARG log_level=info -ARG console_mode=read-only +ARG log_level +ARG console_mode ENV BACKEND_URL=$backend_url ENV CONSOLE_METRICS_PROMETHEUS_URL=$console_metrics_prometheus_url @@ -38,6 +41,13 @@ COPY --from=builder /app/public ./public COPY --from=builder --chown=1001:1001 /app/.next/standalone ./ COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static +ARG log_level +ARG console_mode + +# Ensure set to some default for runtime +ENV LOG_LEVEL=$log_level +ENV CONSOLE_MODE=$console_mode + USER 1001 EXPOSE 3000