1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-07 23:35:16 +00:00
terraform-playground/cf-worker-container/README.md
Jason Hall 9ba46672ce cf-worker-container
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-11-03 13:37:22 -05:00

1.3 KiB

Cloudflare Workers Containers

This is an experiment using Cloudflare Workers Containers to host a Go application on Workers.

Findings:

  • You can't just write Go, you also need to write a simple index.js that handles the Worker request and forwards it to the Container durable object
    • On the plus side, that also means it can forward to multiple containers, which could be interesting
  • You can't just give it a pre-built image; Cloudflare wants to either build it from a Dockerfile and your source, or a publicly pullable image
    • Because Cloudflare wants to do the build, you can't even just do FROM <ko-built-image> if that image is private 😭
  • R2 integration is very DIY; regular Workers have a nice clean API for R2 access, but Containers need to be passed regular API creds via env
  • Monitoring and observability of Containers seem pretty limited
    • The Worker wrapper logs are available, and the Container logs are available via DO, but Container startup logs seem to go into a black hole, which is frustrating when you're debugging startup issues
  • I couldn't see any Terraform support, only declarative wrangler deploy

Due to these limitations, I don't see a lot of upside to using CF Containers over something like Cloud Run, even if it might cost a bit more. 🤷