MOBILE-3738 docker: Use docker-layer cache

Taken from https://github.com/moodlehq/moodleapp/pull/2631

Co-authored-by: LetsMelon <domi.m@outlook.com>
main
Noel De Martin 2021-04-21 16:14:06 +02:00
parent c2065ef83a
commit 89b3288ab5
1 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# This image is based on the fat node 14 image. # This image is based on the fat node 11 image.
# We require fat images as neither alpine, or slim, include git binaries. # We require fat images as neither alpine, or slim, include git binaries.
FROM node:14 FROM node:11
# Port 8100 for ionic dev server. # Port 8100 for ionic dev server.
EXPOSE 8100 EXPOSE 8100
@ -13,10 +13,13 @@ EXPOSE 53703
WORKDIR /app WORKDIR /app
COPY . /app
# Install npm libraries. # Install npm libraries.
RUN npm install && rm -rf /root/.npm COPY package*.json ./
RUN npm ci
# Delete caches.
RUN rm -rf /root/.npm
COPY . /app
# Run gulp before starting. # Run gulp before starting.
RUN npx gulp RUN npx gulp