You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
394 B
16 lines
394 B
4 years ago
|
# build environment
|
||
|
FROM node:13.12.0-alpine as build
|
||
|
WORKDIR /app
|
||
|
ENV PATH /app/node_modules/.bin:$PATH
|
||
|
COPY package.json ./
|
||
|
COPY package-lock.json ./
|
||
|
RUN npm ci --silent
|
||
|
RUN npm install react-scripts@3.4.1 -g --silent
|
||
|
COPY . ./
|
||
|
RUN npm run build
|
||
|
|
||
|
# production environment
|
||
|
FROM nginx:stable-alpine
|
||
|
COPY --from=build /app/build /usr/share/nginx/html
|
||
|
EXPOSE 80
|
||
|
CMD ["nginx", "-g", "daemon off;"]
|