# Use the Node.js 20 base image FROM node:20 # Switch to non-root user USER node # Clone the repository RUN git clone https://github.com/SuhailTechInfo/suhailmd-2.0 /home/node/blue # Set the working directory WORKDIR /home/node/blue # Grant full permissions to the directory (this step should help if there are permission issues) RUN chmod -R 777 /home/node/blue/ # Install dependencies RUN yarn install && yarn add http # Copy server and start script into the directory (ensure these files exist in the new repo or adjust as needed) COPY server.js . COPY start.sh . # Print the contents of the directory to verify files are present (useful for troubleshooting) RUN ls -la /home/node/blue # Run the start script CMD ["bash", "start.sh"]