# Use an official Node.js runtime (lock to v16 compatible with npm@8.x) FROM node:16 # Set the working directory in the container WORKDIR /app # Clone the Rammerhead repository RUN git clone https://github.com/s-tn/rammerhead-heroku.git . # Ensure a compatible npm version (do not upgrade beyond npm@8.x) RUN npm install -g npm@8.19.4 # Install dependencies (use --legacy-peer-deps to handle potential dependency conflicts) RUN npm install --legacy-peer-deps # Build the project RUN npm run build # Expose the necessary port (adjust if the server uses a different port) EXPOSE 8080 # Start the Rammerhead server CMD [ "node", "src/server.js" ]