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:
-
Does Fly.io retain any access to builder-stage layers or intermediate images after deployment?
-
Is there any Fly.io-specific mechanism (internal registry, cache, previous releases, etc.) to retrieve builder-stage contents?
-
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.