build(docker): use yarn for theme assets

This commit is contained in:
Oliver Davies 2021-12-28 01:35:25 +00:00
parent 21e36c47b9
commit 90d593fef8
5 changed files with 5252 additions and 9917 deletions

View file

@ -1,7 +1,12 @@
FROM node:14-alpine AS assets-build
WORKDIR /app
RUN mkdir /node_modules \
chown node:node -R /node_modules /app
USER node
WORKDIR /app/web/themes/custom/opdavies
COPY web/themes/custom/opdavies/package*.json ./
RUN npm ci
COPY web/themes/custom/opdavies/package.json .
COPY web/themes/custom/opdavies/yarn.lock .
RUN yarn install && yarn cache clear
COPY web/themes/custom/opdavies ./
RUN npm run production