railpack

Configure and troubleshoot Railpack builds, with emphasis on RAILPACK_* environment variables, railpack.json overlays, build-plan inspection, local CLI installation and usage, and local BuildKit containers. Use for Railpack provider configuration, custom install/build/start commands, Mise or Apt packages, build or runtime variables and secrets, generated-plan debugging, BUILDKIT_HOST errors, or running Railpack from a release or source checkout.

Install
npx skills add 'https://github.com/railwayapp/railpack/tree/main/.'
Incomplete bundle · no download
main · 21a254fScanned 2026-09-17

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

buildkit/build_llb/cache_store.go

buildkit/build_llb/cache_store.goBrowse 1970 files
View on GitHub
← Back to SKILL.md
package build_llb import (	"fmt" 	"github.com/moby/buildkit/client/llb"	"github.com/railwayapp/railpack/core/plan") type BuildKitCache struct {	cacheKey   string	planCache  *plan.Cache	cacheState *llb.State} type BuildKitCacheStore struct {	uniqueID string	CacheMap map[string]BuildKitCache} func NewBuildKitCacheStore(uniqueID string) *BuildKitCacheStore {	return &BuildKitCacheStore{		uniqueID: uniqueID,		CacheMap: make(map[string]BuildKitCache),	}} func (c *BuildKitCacheStore) GetCache(key string, planCache *plan.Cache) BuildKitCache {	cacheKey := key	if c.uniqueID != "" {		cacheKey = fmt.Sprintf("%s-%s", c.uniqueID, key)	} 	if cache, ok := c.CacheMap[cacheKey]; ok {		return cache	} 	cacheState := llb.Scratch() 	cache := BuildKitCache{		cacheKey:   cacheKey,		planCache:  planCache,		cacheState: &cacheState,	} 	c.CacheMap[cacheKey] = cache 	return cache}