FROM node:16.14.2

# To aid in debugging
RUN apt-get update && \
    apt-get install -y apt-utils && \
    apt-get install -y vim && \
    apt-get install -y net-tools && \
    apt-get install -y iputils-ping

# This is the default directory that `onbuild` creates and copies local directory to
WORKDIR /usr/src/app

# Fix for double install of npm (once from node5, again below to update)
# [Issue: https://github.com/npm/npm/issues/9863]
RUN cd $(npm root -g)/npm \
    && npm install fs-extra \
    && sed -i -e s/graceful-fs/fs-extra/ -e s/fs.rename/fs.move/ ./lib/utils/rename.js

RUN npm install

EXPOSE 8888

CMD [ "npm", "start" ]
