mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2026-03-22 08:39:35 +00:00
29 lines
681 B
Docker
29 lines
681 B
Docker
# build environment
|
|
FROM node:13.12.0-alpine as build
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# add `/app/node_modules/.bin` to $PATH
|
|
ENV PATH /app/node_modules/.bin:$PATH
|
|
|
|
# Install app dependencies
|
|
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
|
# where available (npm@5+)
|
|
COPY package*.json ./
|
|
|
|
#RUN npm install
|
|
# If you are building your code for production
|
|
RUN npm ci --only=production
|
|
|
|
# Bundle app source
|
|
COPY . .
|
|
|
|
CMD [ "npm", "run", "build" ]
|
|
|
|
# production environment
|
|
FROM nginx:stable-alpine
|
|
COPY --from=dist /app/dist /usr/share/nginx/html
|
|
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"] |