use build cache
This commit is contained in:
parent
62275d07b6
commit
0d1fa8af80
|
@ -19,6 +19,8 @@
|
||||||
# CMD ["yarn", "dev"]
|
# CMD ["yarn", "dev"]
|
||||||
|
|
||||||
FROM node:18.16-alpine as base
|
FROM node:18.16-alpine as base
|
||||||
|
ENV PNPM_HOME="/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
# Installing libvips-dev for sharp Compatibility
|
# Installing libvips-dev for sharp Compatibility
|
||||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev libc6-compat git nasm bash gcompat
|
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev libc6-compat git nasm bash gcompat
|
||||||
|
@ -31,7 +33,7 @@ COPY pnpm-lock.yaml package.json ./
|
||||||
# RUN yarn config set network-timeout 600000 -g && yarn install
|
# RUN yarn config set network-timeout 600000 -g && yarn install
|
||||||
# RUN pnpm install --frozen-lockfile
|
# RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||||
COPY ./packages/strapi .
|
COPY ./packages/strapi .
|
||||||
ENV PATH=/app/node_modules/.bin:$PATH
|
ENV PATH=/app/node_modules/.bin:$PATH
|
||||||
RUN chown -R node:node /app
|
RUN chown -R node:node /app
|
||||||
|
|
Loading…
Reference in New Issue