fix(cloudflare): support remote images and external Dockerfiles in LocalContainerProvider#790
Merged
Merged
Conversation
…calContainerProvider Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Install the packages built from this commit: alchemy bun add alchemy@https://pkg.ing/alchemy/0e969b2@alchemy.run/better-auth bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/0e969b2@alchemy.run/pr-package bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/0e969b2 |
…remote-image Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # bun.lock # package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LocalContainerProvideronly handled the Effect-nativemainvariant, so a container declared with a remoteimage(or an externalcontext/dockerfile) died underalchemy devwith "Container requires amainentrypoint". The liveContainerProvidersupports all three image variants; the local provider now mirrors it:Each variant also produces a content hash (
sha256Objectof the image URI, or directory hash + Dockerfile content) so change detection works the same as themainpath.Shared env handling
Replaced
foldEnvIntoEnvironmentVariableswithmakeContainerEnv, shared by both providers. It returns a plainRecord<string, string | Redacted>(mergingenv+environmentVariables+ the injectedALCHEMY_CLOUDFLARE_ACCOUNT_ID) that each provider maps into its ownenvironmentVariablesshape.The local provider keeps its per-run image cache env-free: the cache is warmed by
precreate(unresolved props, so binding-derived env values are stillOutputs and get skipped).makeAttributesattaches the freshly-computed env instead, so a container isn't started with an incomplete env frozen at precreate time.Relative dev paths
dev.context/dev.dockerfileare now emitted as paths relative toprocess.cwd()(and dockerfile relative to context) in both providers, anddiffcompares the resolveddevobject (deepEqual) so a changed build context or Dockerfile triggers an update.Tests
Container.test.tsis now parametrized overdev: true(local,test-localstage) anddev: false(live,test-livestage) viadescribe.concurrent.each, so every image variant is exercised against both runtimes. A freshTest.makecontext is created per case because the local runner stops once the root scope closes.