# Use the official Node.js LTS version as the base image FROM node:lts # Set the working directory WORKDIR /usr/src/app # Copy package.json and package-lock.json first to leverage Docker cache COPY package*.json ./ # Install Angular CLI globally RUN npm install -g @angular/cli # Install dependencies RUN npm install # Copy the rest of the application code COPY . . # Change ownership of the app directory to a non-root user (node) RUN chown -R node:node /usr/src/app # Switch to a non-root user for security USER node # Expose the port your application will run on EXPOSE 7860 # Set the entry point for the container ENTRYPOINT ["bash", "-c", "ng serve --host 0.0.0.0 --port 7860 --configuration=production --disable-host-check"]