Is it possible to recover builder-stage source code from an active Fly.io Docker deployment?

Hi everyone,

I have a Fly.io application deployed using a multi-stage Docker build.

The local source code is no longer available, so I attempted to recover it from the currently running Fly.io deployment. I was able to pull the active runtime image and successfully run the app locally, but the original source code is missing.

From my investigation:

  • The final image only contains runtime/build artifacts

  • The builder stage (where COPY . . and build happened) is not present in the final image

  • docker history, docker save, and layer inspection confirm that source files are not included

  • It appears Fly.io only stores the final optimized image, not intermediate stages

My questions:

  1. Does Fly.io retain any access to builder-stage layers or intermediate images after deployment?

  2. Is there any Fly.io-specific mechanism (internal registry, cache, previous releases, etc.) to retrieve builder-stage contents?

  3. If not, can you confirm that in a standard multi-stage Docker deploy, source code recovery is fundamentally impossible once only the final image exists?

I mainly want to confirm whether this limitation is absolute or if there is any Fly.io-specific recovery option I may have missed.

Thanks in advance.

Normally this happens when there’s been an argument about intellectual property, and someone has kicked another person off the code hosting platform. May I ask what happened? Readers will want to know if you’ve taken someone’s work without paying them.

If not, can you confirm that in a standard multi-stage Docker deploy, source code recovery is fundamentally impossible once only the final image exists?

Your three questions are essentially the same: can you recover the source code? It may depend on what technology you use. If it’s PHP or Ruby, then probably yes; if it’s Go or Java or C++, then no. Node/JS is sort of a middle ground, as it is likely to be minified.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.