From e3152ab19cbe15cafe657e4a6194de7f631ead76 Mon Sep 17 00:00:00 2001 From: cchung100m Date: Sat, 1 Nov 2025 18:05:17 +0800 Subject: [PATCH 1/2] [#4166] improvement: Fix Dockerfile warnings (ENV format, CMD JSON args) --- dashboard/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile index b5450d08478..c7fe1198963 100644 --- a/dashboard/Dockerfile +++ b/dashboard/Dockerfile @@ -45,7 +45,7 @@ RUN \ FROM base AS runner WORKDIR /app -ENV NODE_ENV production +ENV NODE_ENV=production # Uncomment the following line in case you want to disable telemetry during runtime. # ENV NEXT_TELEMETRY_DISABLED 1 @@ -67,8 +67,8 @@ USER nextjs EXPOSE 3000 -ENV PORT 3000 +ENV PORT=3000 # server.js is created by next build from the standalone output # https://nextjs.org/docs/pages/api-reference/next-config-js/output -CMD HOSTNAME="0.0.0.0" node server.js +CMD ["HOSTNAME=0.0.0.0", "node", "server.js"] From 33ad93f0756e6891e1973bbb04941fabe60b9f9e Mon Sep 17 00:00:00 2001 From: Neo Chien <6762509+cchung100m@users.noreply.github.com> Date: Thu, 6 Nov 2025 12:20:39 +0800 Subject: [PATCH 2/2] extract the hostname from CMD Signed-off-by: Neo Chien <6762509+cchung100m@users.noreply.github.com> --- dashboard/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile index c7fe1198963..0135c3a744a 100644 --- a/dashboard/Dockerfile +++ b/dashboard/Dockerfile @@ -71,4 +71,5 @@ ENV PORT=3000 # server.js is created by next build from the standalone output # https://nextjs.org/docs/pages/api-reference/next-config-js/output -CMD ["HOSTNAME=0.0.0.0", "node", "server.js"] +ENV HOSTNAME="0.0.0.0" +CMD ["node", "server.js"]