You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm rather inexperienced when it comes to Docker and turborepo. Currently working on improving an existing CI/CD pipeline following the with-docker example and these docs.
Setup: several Next.js apps in a monorepo, Storybook instance, some UI packages and shared functionality.
Right now everything works, but the builds of the Docker images are super slow. Problem: the COPY . . instruction in the Dockerfile's builder stage takes a long time, as it copies over a rather large amount of files. See snippet below (2nd last line). Before running RUN turbo prune, we're copying over the whole project (= several other Next.js apps, and packages that are possibly needed for the app we're pruning for on the last line). Any idea how to streamline this? Is this intended to work like this?
FROM base AS builder
RUN apk update
RUN apk add --no-cache libc6-compat
WORKDIR /builder
RUN pnpm install -g turbo
COPY . .
RUN turbo prune <app_name> --docker
Many thanks, all help much appreciated! Also any further tips in how to generally set up a lean process for this kind of setup.. (caching etc. will be next, after getting the builds to be faster).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hey there!
I'm rather inexperienced when it comes to Docker and turborepo. Currently working on improving an existing CI/CD pipeline following the with-docker example and these docs.
Setup: several Next.js apps in a monorepo, Storybook instance, some UI packages and shared functionality.
Right now everything works, but the builds of the Docker images are super slow. Problem: the
COPY . .
instruction in the Dockerfile's builder stage takes a long time, as it copies over a rather large amount of files. See snippet below (2nd last line). Before runningRUN turbo prune
, we're copying over the whole project (= several other Next.js apps, and packages that are possibly needed for the app we're pruning for on the last line). Any idea how to streamline this? Is this intended to work like this?Many thanks, all help much appreciated! Also any further tips in how to generally set up a lean process for this kind of setup.. (caching etc. will be next, after getting the builds to be faster).
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions