Containers custom build
so in the base containers config they simply reference a dockerfile like this: https://github.com/cloudflare/templates/blob/main/containers-template/wrangler.jsonc#L13
that's not ideal for my project because:
1. I want to build the containers myself
- (I need to pass ARGs and then minify them)
2. I want to keep my
docker/
stuff separate of my web/
stuff
I made this project a few days after Containers came out. Are there any new built-in mechanisms to help me handle this?
Additionally, I need to periodically update my images in the container repo. So far I've been using a Github Action that builds and pushes the new versions using the wrangler CLI
, however this seems like it.. breaks(?) my images? Eventually, after a few updates, when a container boots up it says it can't find the image.
To fix this, I've just had to manually build + minify + push them on my machine.
Any advice would be appreciated!4 Replies
also the manual push commands sometimes just sit here forever :Soulless:

Look at Sam's alchemy, should be able to do what you need.
GitHub
GitHub - alchemy-run/alchemy: Infrastructure as TypeScript
Infrastructure as TypeScript. Contribute to alchemy-run/alchemy development by creating an account on GitHub.
Are there any new built-in mechanisms to help me handle this?Not yet™ but I also don't know what would work best. We can
docker login
(or dump the creds) for you so you can do your own builds & push to the registry without using Wrangler (although we just shell out to docker
so that wouldn't fix the hanging upload)
The other issue is getting your newly built tag into config, which is kinda meh, so we could add a --containers-image
flag to deploy
so you can just pass it an environment variable or any other way you want to get the artifact from your build process.
when a container boots up it says it can't find the image.This sounds like a bug we should fix if your deploys are failing with images you already pushed.