It’s currently unusable for me as a platform to host a docker-baed app as I can’t build using doctl apps dev build
Is there any way to enable Buildkit either natively or to pass DOCKER_BUILDKIT=1?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Not 100% sure but I think that the App Platform’s build infrastructure does not support BuildKit-specific Dockerfile syntax right now. Things like RUN --mount=type=cache or --mount=type=secret will fail because the builder on their end does not have BuildKit enabled, and there is no flag or env var you can pass through doctl apps dev build to change that.
The most practical workaround is to build locally with BuildKit and push to DigitalOcean’s container registry, then deploy from there:
docker build -t registry.digitalocean.com/your-registry/your-app .
docker push registry.digitalocean.com/your-registry/your-app
Then point your App Platform app to use that registry image instead of building from source. BuildKit is the default in Docker Engine 23.0+ so your local builds will use it automatically, no extra flags needed.
If you can avoid BuildKit-specific syntax, standard multi-stage builds work fine on App Platform without any changes.
The real fix is DigitalOcean enabling BuildKit on App Platform’s build infrastructure. Worth opening a support ticket and posting on the DigitalOcean ideas portal so it gets visibility as a feature request.
Heya, @thomasbrocken
Build the image locally with BuildKit enabled and push it to DO Container Registry, then point your app spec at the pre-built image instead of letting App Platform build it. Sidesteps the issue entirely and honestly gives you more control over the build anyway.
Alternatively if your Dockerfile has specific BuildKit syntax (--mount=type=cache etc) you might be able to restructure it to work without those features for the App Platform build, not ideal but sometimes doable.
Worth dropping a feature request at ideas.digitalocean.com if you haven’t - BuildKit support has been requested before and more votes helps. Are you hitting this with a specific Dockerfile instruction or just the general BuildKit requirement?
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.