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
parent
c2065ef83a
commit
89b3288ab5
13
Dockerfile
13
Dockerfile
|
@ -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.
|
||||
FROM node:14
|
||||
FROM node:11
|
||||
|
||||
# Port 8100 for ionic dev server.
|
||||
EXPOSE 8100
|
||||
|
@ -13,10 +13,13 @@ EXPOSE 53703
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
|
||||
# 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 npx gulp
|
||||
|
|
Loading…
Reference in New Issue