Build cache and images
Builds run on your own servers, so the cache and the images they leave stay there too. OpenPanel's agent keeps them within bounds.
The build cache
- Docker's build cache. Builds reuse the layers and cache of earlier builds on the same server, the way Docker always does, so a build that changes little is quick.
- Per service, for Railpack. A Railpack build keeps its package managers' caches, such as npm's or pip's, under a key of its own service, so one service's cache never mixes with another's.
- On each server. A server's cache serves the builds on that server only. A service built on another server starts without it.
How much is kept
| What | Kept |
|---|---|
| Build cache | The newest 5 GB on each server. |
| Deployment images | The newest five deployments' images of each service, plus any a container runs now. |
| Images builds left without a name | None. |
The agent prunes every 6 hours, after builds, and within the hour while the server's disk is 80% full or more. It never removes an image that OpenPanel did not pull or build, and Docker refuses to remove an image a container uses.
To keep more build cache on a server that builds a lot, set OPENPANEL_BUILD_CACHE_KEEP_GB for its agent, in gigabytes:
sudo systemctl edit openpanel-agent[Service]
Environment=OPENPANEL_BUILD_CACHE_KEEP_GB=20sudo systemctl restart openpanel-agentResources a build may use
A build is not limited: it uses the server's processors and memory beside the services that already run there, and a server runs one build at a time. On a small server, a large build can slow its other services while it runs. The limits you set on a service apply to its containers, not to its build.
Build output
What a build prints is in the deployment's events for two days. See How builds work.