Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

:rocket: Optimise the docker file to use the build cache

Manjusaka023c070cfe20
diff --git a/.github/deployment/Dockerfile-affine b/.github/deployment/Dockerfile-affine
index 9d54eb0cf4..6ea3d70fa7 100644
--- a/.github/deployment/Dockerfile-affine
+++ b/.github/deployment/Dockerfile-affine
@@ -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
diff --git a/.github/deployment/Dockerfile-affine-keck b/.github/deployment/Dockerfile-affine-keck
index ae76e1b01e..296428f770 100644
--- a/.github/deployment/Dockerfile-affine-keck
+++ b/.github/deployment/Dockerfile-affine-keck
@@ -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
diff --git a/.github/deployment/Dockerfile-keck b/.github/deployment/Dockerfile-keck
index 7918e49427..99a31c01c7 100644
--- a/.github/deployment/Dockerfile-keck
+++ b/.github/deployment/Dockerfile-keck
@@ -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
diff --git a/.github/deployment/Dockerfile-lisa b/.github/deployment/Dockerfile-lisa
index f469a7fce8..5721ad090b 100644
--- a/.github/deployment/Dockerfile-lisa
+++ b/.github/deployment/Dockerfile-lisa
@@ -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
diff --git a/.github/deployment/Dockerfile-venus b/.github/deployment/Dockerfile-venus
index 585ade8a20..27bc80a4be 100644
--- a/.github/deployment/Dockerfile-venus
+++ b/.github/deployment/Dockerfile-venus
@@ -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