UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Dockerfile.node-vite-ui.dev 554 B
Newer Older
Patrick Tafoya's avatar
Patrick Tafoya committed
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's avatar
Patrick Tafoya committed

# set up dependencies
COPY --chown=node:node ./<<projectName>>-ui/package.json ./
Patrick Tafoya's avatar
Patrick Tafoya committed

# install dependencies
# 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
Patrick Tafoya's avatar
Patrick Tafoya committed

EXPOSE 8080

# Default command (can be overridden by docker-compose)