This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
reacttest/reactapp/Dockerfile

21 lines
403 B
Docker
Raw Normal View History

2019-03-03 14:12:58 +00:00
FROM node:lts AS dev
# some dir for our code
WORKDIR /app
# mount code
VOLUME ["/app"]
# this is how we start
CMD [ "yarn", "start" ]
FROM node:lts AS build
# some dir for our code
WORKDIR /app
# install dependencies
COPY package*.json yarn*.lock ./
RUN yarn --production=false
# copy code
COPY . .
RUN yarn build
FROM nginx:stable-alpine AS prod
COPY --from=build /app/dist /usr/share/nginx/html