# Use the official Node.js image as a base
FROM ubuntu:22.04

# update
RUN apt update
# Install node
RUN apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
RUN bash -E nodesource_setup.sh
RUN apt-get install -y nodejs

# confirm that it was successful
RUN node -v
RUN npm -v

# Create workdir
RUN mkdir -p /home/app/get-optimal-turn

# Set the working directory inside the container
WORKDIR /home/app/get-optimal-turn

# Copy package.json and package-lock.json to the working directory
COPY --chown=node package*.json ./



## Install dependencies
#RUN npm install
#
## Copy the entire project to the working directory
#COPY --chown=node . .
#
## Build the app for production
#RUN npm run build
