mirror of
https://github.com/Team4388/ScoutingApp2022.git
synced 2026-06-09 00:38:03 -06:00
22 lines
524 B
Docker
22 lines
524 B
Docker
FROM node:16-alpine as build-step
|
|
RUN mkdir /app/
|
|
RUN mkdir /app/node_modules
|
|
RUN chown -R node:node /app/node_modules
|
|
#RUN mkdir /app/node_module/.bin
|
|
WORKDIR /app/
|
|
ENV PATH /app/node_modules/.bin:$PATH
|
|
COPY package.json ./
|
|
COPY package-lock.json ./
|
|
RUN npm install
|
|
COPY . ./
|
|
# USER node
|
|
RUN npm run build
|
|
|
|
FROM nginx:1-alpine
|
|
COPY --from=build-step /app/build /usr/share/nginx/html
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
# COPY nginx/nginx.conf /etc/nginx/conf.d
|
|
EXPOSE 8080
|
|
# EXPOSE 443
|
|
CMD ["nginx", "-g", "daemon off;"]
|