Newer
Older
FROM node:20.11
# Create and set ownership for /home/node
RUN mkdir -p /home/node && chown node:node /home/node
WORKDIR /home/node
USER node
Patrick Tafoya
committed
COPY --chown=node:node ./<<projectName>>-ui/package.json ./
Patrick Tafoya
committed
# TODO: It would be vest to ensure npm install has been run before creating the image for the first time, then the if check can be removed
RUN if test -f package-lock.json ; then npm ci ; else npm i ; fi
EXPOSE 8080
# Default command (can be overridden by docker-compose)
Patrick Tafoya
committed
CMD ["npx", "vite", "--host"]