Skip to content

Modular logistics and supply chain operating system (LSOS)

fix console dockerfile builds for console

Ronald A. Richardson77618c8edb5a
diff --git a/console/Dockerfile b/console/Dockerfile
index f5895fe4..43ba52fc 100644
--- a/console/Dockerfile
+++ b/console/Dockerfile
@@ -1,5 +1,5 @@
# ---- Build Stage ----
-FROM node:22.13.0-alpine3.19 AS builder
+FROM node:22.22.0-alpine3.22 AS builder
# Set the working directory in the container to /console
WORKDIR /console
@@ -15,7 +15,7 @@ ARG ENVIRONMENT=production
ENV PATH=/root/.pnpm/bin:$PATH
# Copy pnpm-lock.yaml (or package.json) into the directory /console in the container
-COPY package.json pnpm-lock.yaml ./
+COPY package.json pnpm-workspace.yaml ./
# Copy over .npmrc if applicable
COPY .npmr[c] ./
@@ -51,4 +51,4 @@ EXPOSE 4200
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Start Nginx server
-CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
+CMD ["nginx", "-g", "daemon off;"]
diff --git a/console/Dockerfile.server-build b/console/Dockerfile.server-build
index 3ae82eda..e2daaed5 100644
--- a/console/Dockerfile.server-build
+++ b/console/Dockerfile.server-build
@@ -1,4 +1,4 @@
-FROM node:22.13.0-alpine3.19 AS base
+FROM node:22.22.0-alpine3.22 AS base
# Use a more secure and up-to-date Alpine version to reduce vulnerabilities.
# Install security updates and essential build tools, then clean up to minimize image size.
@@ -12,28 +12,6 @@ RUN apk --no-cache upgrade && \
g++ && \
rm -rf /var/cache/apk/*
-# Set working directory
-WORKDIR /app
-
-# Copy package files first for better caching
-COPY package*.json ./
-
-# Install dependencies with npm ci for reproducible builds
-RUN npm ci --omit=dev
-
-# Copy the rest of the application
-COPY . .
-
-# Run security audit and fix non-breaking issues
-RUN npm audit fix --force || true
-
-# Set non-root user for better security
-RUN addgroup -S nodejs && adduser -S nodejs -G nodejs
-USER nodejs
-
-# Default command
-CMD ["node", "--version"]
-
WORKDIR /console
RUN mkdir -p ~/.pnpm
@@ -42,13 +20,13 @@ ENV PATH=/root/.pnpm/bin:$PATH
RUN npm install -g ember-cli pnpm
-RUN apk update && apk add git
-
-COPY package.json pnpm-lock.yaml ./
+COPY package.json pnpm-workspace.yaml ./
COPY .npmr[c] ./
RUN pnpm install
+COPY . .
+
EXPOSE 4200
CMD ["pnpm", "run", "start:dev", "--", "--host", "0.0.0.0"]