hamstr/Dockerfile
2022-05-23 21:13:09 -05:00

23 lines
589 B
Docker

FROM node:12.22.11-alpine3.15 as build
COPY package.json /app/build/package.json
COPY yarn.lock /app/build/yarn.lock
WORKDIR /app/build
# --no-cache: download package index on-the-fly, no need to cleanup afterwards
# --virtual: bundle packages, remove whole bundle at once, when done
RUN apk --no-cache --virtual build-dependencies add \
python3 \
make \
g++ \
&& yarn \
&& apk del build-dependencies
COPY . /app/build
RUN npx quasar build
FROM nginx as nginx-astral
COPY ./nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build/dist/spa /app