Add support for railpack build cache
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
Railpack build is able to use a cache so that future builds are faster.
There are many ways to enable cache for buildkit (which railpack uses under the hood): https://github.com/moby/buildkit#inline-push-image-and-cache-together
- Inline: this just puts the cache inside the generated image
- Registry: pushes a cache container to a registry (can be used with dokploy registries)
- Local directory: puts the cache into a certain directory
- Github actions: not applicable
Describe the solution you'd like
The best point would be to use Registry cache, appending these lines to the build command here: https://github.com/Dokploy/dokploy/blob/1c6fdc1b4379bf6c17611ffc2c8065526f80f20b/packages/server/src/utils/builders/railpack.ts#L48
--export-cache type=registry,ref=localhost:5000/myrepo:buildcache \
--import-cache type=registry,ref=localhost:5000/myrepo:buildcache
Describe alternatives you've considered
N/A
Additional context
I'm willing to work on a PR for this, the UI changes would be these:
- When Railpack is selected as the builder, show a "Enable Cache" option, which requires a registry to be set up. When it's enabled, add the relevant
--import-cacheand--export-cachecommands to the railpack build command
Will you send a PR to implement it?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/server/src/utils/builders/railpack.ts at the linked build-command entry point, then trace the Railpack builder settings in the UI and registry configuration. Confirm how builder selection and registry requirements are represented before deciding where the cache option belongs. Done means the option is available only for Railpack, requires a configured registry, and the generated build command includes the requested cache settings when enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100