Commit graph

2 commits

Author SHA1 Message Date
ab37c5403a docker: hardcode BUILD_ENV_IMAGE tag in COPY --from=
'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.
2026-06-27 16:26:39 +01:00
7e99bbd54c docker: add Dockerfile.runtime / .blogs / .api for ASP.NET images
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.
2026-06-27 16:13:12 +01:00