serverless-scaleway-functions icon indicating copy to clipboard operation
serverless-scaleway-functions copied to clipboard

Error message for failed docker build is a bit confusing

Open korridor opened this issue 1 year ago • 2 comments

I made a mistake in the Dockerfile that I tried to deploy as a serverless container and the error message from the serverless deploy command was this:

Using credentials from serverless.yml
Updating container app...
Building and pushing container app to: rg.nl-ams.scw.cloud/xxxx/app:latest ...
Deploying Containers...
Waiting for container deployments, this may take multiple minutes...
Environment: linux, node 14.20.0, framework 3.21.0 (local), plugin 6.2.2, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues
Error:
Error: Error: Error: Error: Unable to fetch image "rg.nl-ams.scw.cloud/xxxx/app:latest": failed to resolve image to digest: HEAD https://rg.nl-ams.scw.cloud/v2/xxxx/app/manifests/latest: unexpected status code 404 Not Found (HEAD responses have no body, use GET for details).
    at manageError (/builds/xxxx/xxxx/node_modules/serverless-scaleway-functions/shared/api/utils.js:20:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

This is a bit confusing, because the logging suggests that the build and push succeeded and the deployment after that was is the problem. Only after I activated --verbose it became clear to me that the docker build was the problem.

korridor avatar Aug 14 '22 12:08 korridor

Hello :wave:

Thanks for reporting the issue. The linked PR should solve this. After the reviews are done, we'll release a new version with the fix!

norbjd avatar Aug 26 '22 15:08 norbjd

Thanks! 👍

korridor avatar Aug 29 '22 09:08 korridor

Hello @korridor, a new version (0.4.2) have been released and fixes this issue. Tell us if you are still facing this issue and we'll reopen it.

norbjd avatar Sep 09 '22 15:09 norbjd