oneuptime/admin-dashboard/Dockerfile.dev

36 lines
749 B
Docker

#
# Admin Dashboard Dockerfile
#
# Pull base image nodejs image.
FROM node:16
#SET ENV Variables
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# Install nodemon
RUN npm install nodemon -g
WORKDIR /usr/src/app
# Copy package.json files
COPY ./package.json /usr/src/app/package.json
COPY ./package-lock.json /usr/src/app/package-lock.json
# Install app dependencies
RUN npm ci
# Create .cache folder with necessary permissions for React-based apps
# https://stackoverflow.com/questions/67087735/eacces-permission-denied-mkdir-usr-app-node-modules-cache-how-can-i-creat
RUN mkdir -p node_modules/.cache && chmod -R 777 node_modules/.cache
# Expose ports.
# - 3100: Fyipe-admin-dashboard
EXPOSE 3100
#Run the app
CMD [ "npm", "run", "dev" ]