# Fetch node image 
FROM node:20.18.0-slim

# Set the working directory (Inside the container)
WORKDIR /app

# Copy the package.json and package-lock.json to the container
COPY package*.json ./

RUN npm install -g @angular/cli

# Build angular application 
# RUN npm install

# Copy the source code to the container
COPY . .

# RUN npm run build 

# Expose the port 4200
EXPOSE 4200

# Start the application
CMD ["ng", "serve", "--host", "0.0.0.0"]