ccprojectsapi / Dockerfile
Jonell01's picture
Update Dockerfile
aabb39f verified
raw
history blame contribute delete
580 Bytes
# Use Node.js 18 as the base image
FROM node:18
# Set working directory inside the container
WORKDIR /app
# Clone your GitHub repository
RUN git clone https://github.com/jonellcc/jonellccprojectsapis.git /app
# Set full read/write/execute permissions for all files & directories
RUN chmod -R 777 /app
# Change to the cloned repository directory
WORKDIR /app
# Install dependencies (if needed)
RUN npm install
# Expose the necessary port (modify based on your API)
EXPOSE 8080
# Run as root to avoid permission issues
USER root
# Start the server
CMD ["node", "index.js"]