Urgent.News

What's breaking now, across thousands of outlets.

Tech

Docker COPY --from stage not found in CI

A docker COPY --from stage not found does not produce a message about stages, because BuildKit does not treat an unknown name as a mistake. It treats it as an image reference and goes to a registry for it, so the line in your log is an authorization failure for a repository you have never heard of. A numeric index behaves completely differently and does say what is wrong. A name that matches no…

When a Docker COPY --from stage cannot be found in the CI pipeline, it does not generate an error message about stages. This is because BuildKit, the underlying technology, treats an unknown name as an image reference and searches for it in a registry instead of treating it as a mistake. The log entry in this case indicates an authorization failure for a repository that has never been seen before. In contrast, a numeric index behaves differently and explicitly points out the issue.

The error message "pull access denied, repository does not exist or may require authorization" suggests that the stage name is misspelled or has been renamed elsewhere in the Dockerfile. This scenario often goes unnoticed during code reviews, as the diff appears to be a simple rename and the missing `COPY --from` reference is located elsewhere in the file.

Another common cause is copying from a stage that exists in a different Dockerfile, which can happen when a team splits one Dockerfile into multiple files or copies a stanza between services.

If the stage name is numeric and falls outside the valid range, the error message will be "invalid stage index N." This issue usually arises when stages are inserted or removed from the file, causing the index to become out of range. It is important to note that an unmatched name is treated as an image reference, and stage names that resemble image names may result in a silent registry trip rather than an error.

To resolve the issue, it is recommended to read the last words of the line first. If the message ends with a suggestion naming one of your stages, correct the spelling and stop reading the registry text. If there is no suggestion, manually compare the name with the `FROM ... AS` lines in the Dockerfile, as typos may be too large to be suggested. After addressing the typo, verify whether the issue has been resolved or if it is a real pull problem requiring attention to credentials.

In order to prevent such errors from occurring, it is advised to give every stage an explicit name and never reference a stage using an index. Prefixing stage names can also help prevent confusion, as an unmatched name would not be mistaken for an image reference in the log. Additionally, it is crucial to keep credentials present in jobs that build, as a registry denial will always be related to the stage name rather than authentication issues.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I got tired of Redis and Kafka eating my RAM, so I rebuilt them in Rust hitting 1.6M RPS (as a student)

Hey everyone, I’m Yasir. I’m an 18-year-old software engineering student from Pakistan, and for the last few months, I’ve been going down a very deep, very complex rabbit hole: Systems Programming in…

  • 18-year-old Pakistani student builds custom message queue and in-memory store in Rust
  • Velocity-MQ and VelocityDB architectures enable 1.6M RPS performance
  • First-semester CS student seeks community feedback and contributions

Embiody 0.9 Preview Arrives: The Browser for AI Agents That Don't Slow Down in the Background

Browsers are designed for people; an AI agent can use them, but they don't quite fit. That's why we made one of our own. BrowserDo MCP + Embiody Browser 0.9 Preview has been in closed beta for two…

  • Embiody 0.9 Preview introduces browser for AI agents to work alongside humans
  • IA tabs function maintains full operation even when running in background
  • Anti-bot blocking system prevents browser from being flagged as bot

No space left on device in GitHub Actions

"No space left on device" in GitHub Actions means the runner disk filled up mid-job and the next write failed. Find out which of the three shapes you have, bytes, inodes or watchers, then reclaim…

Supercharge AWS Emulator for AWS CDK Development with cdkd

TL;DR When you use AWS Emulator for development with AWS CDK, combining it with cdkd gives you the following benefits: cdkd automatically configures the connection to AWS Emulator, and environment…

  • cdkd simplifies AWS Emulator integration for CDK development.
  • cdkd configures AWS Emulator connection and resolves Lambda environment variables.
  • cdkd local runs app code locally while emulating or mocking AWS resources.

Our hospital chatbot cheated at its own exams — on purpose

When a hospital rolls out an HIS like InterSystems TrakCare, the knowledge lives in three places: classroom sessions, a Moodle full of training videos, and a pile of assessments everyone must pass.

  • Hospital chatbot trained on Moodle assessments
  • Bot completed 36 assessments to gather answers
  • System designed for Arabic-speaking hospitals

More from Sunday 15 November →