- Update base image from node:18-slim to node:22-slim (matching package.json engines requirement) - Add git to apt-get install (needed by npm dependencies) - Add webpack-ext step (builds external bundles) - Add mkdir -p src/pack (prevents race condition) - Add pack-prod step (builds application bundles) - Reorder: build steps before gs-app-server install Tested on ARM64 (Raspberry Pi 4, Docker 29.4.0) and x86_64 (Ubuntu 24.04, Docker 28.0.4). Without these changes, the container starts but serves an incomplete app that never finishes loading.
17 lines
373 B
Docker
17 lines
373 B
Docker
FROM node:22-slim
|
|
WORKDIR /grid
|
|
COPY package.json /grid
|
|
COPY app.js /grid
|
|
COPY apps /grid/apps
|
|
COPY src /grid/src
|
|
COPY web /grid/web
|
|
COPY bin /grid/bin
|
|
RUN apt-get -y update; apt-get -y install curl git
|
|
EXPOSE 8080
|
|
RUN npm i
|
|
RUN npm run webpack-ext
|
|
RUN mkdir -p src/pack
|
|
RUN npm run pack-prod
|
|
RUN npm install -g @gridspace/app-server
|
|
RUN rm -rf /grid/bin
|
|
CMD gs-app-server
|