'COPY --from=${BUILD_ENV_IMAGE}' is rejected by BuildKit:
failed to solve: failed to parse stage name "${BUILD_ENV_IMAGE}":
invalid reference format: repository name
(library/${BUILD_ENV_IMAGE}) must be lowercase
A COPY --from= can only reference either a local stage of the
same Dockerfile, or a static image reference. ARG interpolation
in the stage name is not supported.
Replace the ARG + interpolation with the pinned tag in all
three Dockerfile.runtime* files. Bumping the build-env image
now means updating Dockerfile, Dockerfile.backend, and the three
Dockerfile.runtime* in lockstep.
Three new Dockerfiles, each producing a minimal runtime image
based on mcr.microsoft.com/dotnet/aspnet:10.0:
- Dockerfile.runtime : Yavsc.Org (port 5000 HTTP)
- Dockerfile.runtime.blogs : Yavsc.Blogs (port 5004 HTTP)
- Dockerfile.runtime.api : Yavsc.Api (port 5002 HTTP)
Each one:
1. COPY --from=pazof/yavsc-build-env:debian12-dotnet10-android36-v1
/app/publish/<project>/ — i.e. the artifacts produced by the
publish step added in the previous commit.
2. Injects appsettings-org.json via BuildKit secret mount
(--mount=type=secret,id=yavsc_appsettings). The secret never
lands in a layer — BuildKit copies it into /app and discards
the mount.
3. Sets ASPNETCORE_URLS to the project's HTTP port and exposes it.
4. Adds a HEALTHCHECK that pings the root URL.
HTTPS (ports 5001, 5003, 5005) is intentionally NOT exposed in
the Dockerfile: enabling it requires mounting /etc/letsencrypt
(typically via docker-compose) and configuring Kestrel:Certificates
in appsettings-org.json. The compose file in the next commit
documents the volume mount pattern.