hamstr/Dockerfile

23 lines
589 B
Docker
Raw Normal View History

2022-03-27 17:29:15 +00:00
FROM node:12.22.11-alpine3.15 as build
2022-01-22 16:54:39 +00:00
2022-03-27 17:29:15 +00:00
COPY package.json /app/build/package.json
COPY yarn.lock /app/build/yarn.lock
2022-01-22 16:54:39 +00:00
WORKDIR /app/build
2022-05-24 02:13:09 +00:00
# --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
2022-01-22 16:54:39 +00:00
COPY . /app/build
2022-03-27 17:29:15 +00:00
RUN npx quasar build
2022-01-22 16:54:39 +00:00
2022-05-24 02:13:09 +00:00
FROM nginx as nginx-astral
2022-01-22 16:54:39 +00:00
COPY ./nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build/dist/spa /app