I've encountered an inconsistency with how wrangler dev and wrangler deploy handle Docker build contexts. The Issue: When I place my Dockerfile in a subdirectory (e.g., cf-worker/containers/project-a/Dockerfile) and set the image field in wrangler.jsonc to './containers/project-a/Dockerfile':
wrangler dev builds successfully wrangler deploy fails
Root Cause: The two commands use different build contexts:
wrangler dev uses the Dockerfile's directory as the build context wrangler deploy uses the worker's root directory as the build context
Current Workaround: To make both commands work, I have to:
Move the Dockerfile to the worker root Update the image field in wrangler.jsonc to './Dockerfile' Modify COPY statements in the Dockerfile to account for the new context
Also deployed container has 30 second cold start and causing transaction timeout errors