mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-10-29 09:52:36 +00:00
33 lines
824 B
Docker
33 lines
824 B
Docker
# build environment
|
|
FROM node:13.12.0-alpine as build
|
|
|
|
ARG NPM_TOKEN
|
|
|
|
# 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 (echo "@tip-wlan:registry=https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/" && echo "//tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/:_authToken=$NPM_TOKEN") > .npmrc
|
|
RUN npm ci --silent
|
|
RUN npm install react-scripts@3.4.1 -g --silent
|
|
RUN rm -f .npmrc
|
|
COPY . ./
|
|
|
|
FROM node:13.12.0-alpine
|
|
WORKDIR /app
|
|
|
|
EXPOSE 3000
|
|
|
|
COPY --from=build /app /app
|
|
|
|
RUN npm run eslint
|
|
CMD ["npm", "start"] |