Skip to content

Commit

Permalink
🚀 Optimise the docker file to use the build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheaoli committed Sep 11, 2022
1 parent fde0016 commit 023c070
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/deployment/Dockerfile-affine
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:16-alpine as builder
WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
# RUN apk add g++ make python3 git libpng-dev
RUN apk add git
RUN npm i -g pnpm@7 && 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 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
Expand Down
4 changes: 2 additions & 2 deletions .github/deployment/Dockerfile-affine-keck
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:16-alpine as builder
WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
# RUN apk add g++ make python3 git libpng-dev
RUN apk add git
RUN npm i -g pnpm@7 && 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 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
Expand Down
4 changes: 2 additions & 2 deletions .github/deployment/Dockerfile-keck
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:16-alpine as builder
WORKDIR /app
RUN apk add g++ make python3 git libpng-dev && npm i -g pnpm@7
COPY . .
RUN apk add g++ make python3 git libpng-dev
RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck

FROM node:16-alpine as node_modules
WORKDIR /app
Expand Down
4 changes: 2 additions & 2 deletions .github/deployment/Dockerfile-lisa
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:16-alpine as builder
WORKDIR /app
RUN apk add git && npm i -g pnpm@7
COPY . .
# RUN apk add g++ make python3 git libpng-dev
RUN apk add git
RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build
RUN 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
Expand Down
4 changes: 2 additions & 2 deletions .github/deployment/Dockerfile-venus
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:16-alpine as builder
WORKDIR /app
RUN apk add g++ make python3 git libpng-dev && npm i -g pnpm@7
COPY . .
RUN apk add g++ make python3 git libpng-dev
RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:venus
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:venus

FROM node:16-alpine as relocate
WORKDIR /app
Expand Down

0 comments on commit 023c070

Please sign in to comment.