ci: 🚀 Optimize the docker file to use the build cache

This commit is contained in:
Manjusaka
2022-09-11 16:10:25 +08:00
parent cfe5dda80b
commit 11f1b22d6f
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
# RUN apk add g++ make python3 git libpng-dev
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build:local --skip-nx-cache
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build:local --skip-nx-cache
FROM node:16-alpine as relocate
WORKDIR /app
+1 -1
View File
@@ -3,7 +3,7 @@ WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
# RUN apk add g++ make python3 git libpng-dev
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build:local-keck --skip-nx-cache
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build:local-keck --skip-nx-cache
FROM node:16-alpine as relocate
WORKDIR /app
+1 -1
View File
@@ -2,7 +2,7 @@ FROM node:16-alpine as builder
WORKDIR /app
RUN apk add g++ make python3 git libpng-dev && npm i -g pnpm@7
COPY . .
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck
FROM node:16-alpine as node_modules
WORKDIR /app
+1 -1
View File
@@ -3,7 +3,7 @@ WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
# RUN apk add g++ make python3 git libpng-dev
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build
FROM node:16-alpine as relocate
WORKDIR /app
+1 -1
View File
@@ -2,7 +2,7 @@ FROM node:16-alpine as builder
WORKDIR /app
RUN apk add g++ make python3 git libpng-dev && npm i -g pnpm@7
COPY . .
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:venus
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:venus
FROM node:16-alpine as relocate
WORKDIR /app