nervmag/Dockerfile

14 lines
322 B
Docker

# Stage 1 - the build process
FROM node:alpine as build-deps
WORKDIR /usr/src/app
COPY *.js *.json yarn.lock ./
COPY public ./public/
COPY src ./src/
RUN yarn && \
yarn build && \
yarn cache clean
# Stage 2 - the production environment
FROM nginx:alpine
COPY --from=build-deps /usr/src/app/dist /usr/share/nginx/html