try pulling an image even if docker login fails#11360
Merged
emily-shen merged 3 commits intomainfrom Dec 1, 2025
Merged
Conversation
🦋 Changeset detectedLatest commit: 6e84a34 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
nikitassharma
approved these changes
Nov 20, 2025
2051fd5 to
ccb2f18
Compare
ccb2f18 to
7f306a9
Compare
edmundhung
reviewed
Nov 26, 2025
edmundhung
approved these changes
Nov 26, 2025
Co-authored-by: Edmund Hung <edmund@cloudflare.com>
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.
Fixes CC-6472
Previously the only image registry allowed was the cloudflare managed one, and the only way to auth with that was to query the containers api for credentials. So we always did that before pulling an image. The vite plugin (for various reasons) couldn't call that api, so registry uris didn't work at all with the vite plugin.
Now we support some external registries, which users could authenticate with directly using docker login, so let's try pulling the image anyway even if calling our API fails. The API might return (short-lived) credentials for external registries if this has been previously configured via
wrangler contaienrs registries configure, so it is worth trying to call it still.The cloudflare-managed registry still wont work with the vite plugin as the only way to get credentials for that is via our API, so this PR also adds a more helpful error message in that case.
Also note that I'm not sure if it is worth adding CI tests for this, since it would involve having to set up a wrangler AWS or dockerhub account to run those tests, and storing secrets for that on this github repo, and introducing a likely spot for flakes.
However, i have tested this manually by: