Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .agents/skills/docker-and-compose/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Every port published on the developer's machine, by the compose file or by `laun
2. Anything the app writes goes under `/app/data`, the only folder the app user can write to.
3. Pin every image in compose to a version, and bump them with the monthly package update (`packages-and-dependencies`).
4. Change base images through the `ARG`s at the top, not inside a `FROM`.
5. Test locally with `docker compose up -d --build`, then hit `/health/ready` and the API reference.
5. Keep the OS upgrade at the top of the `run` stage (`apk upgrade` on Alpine, `dnf upgrade` on the Lambda image). Base images lag behind OS security fixes, and the container scan fails on a HIGH finding that already has a fix.
6. Test locally with `docker compose up -d --build`, then hit `/health/ready` and the API reference.

## Don't

Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,17 @@ jobs:
id-token: write

steps:
# Check out first: checkout empties the workspace, so anything downloaded before it is lost.
- name: Checkout
id: checkout
uses: actions/checkout@v7

- name: Setup .NET
id: setup
uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'

- name: Download Template
id: download-template
uses: actions/download-artifact@v8
Expand Down Expand Up @@ -598,16 +609,6 @@ jobs:
DRY_RUN: ${{ needs.release.outputs.dry-run == 'true' && 'yes' || '' }}
shell: bash

- name: Checkout
id: checkout
uses: actions/checkout@v7

- name: Setup .NET
id: setup
uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'

- name: Publish API
id: publish-api
run: dotnet publish ./src/Presentation/Presentation.csproj --configuration Release --output sbom-source --no-self-contained
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ RUN dotnet publish ./src/**/Presentation.csproj --no-restore -c Release -v quiet

# Runtime Image
FROM ${BASE_IMAGE_REPO}/${BASE_IMAGE_RUNTIME}:${BASE_IMAGE_RUNTIME_TAG} AS run

# Apply Alpine security fixes published since the base image was built, so the
# container scan isn't waiting on the next base image release.
RUN apk upgrade --no-cache

WORKDIR /app
ENV ASPNETCORE_HTTP_PORTS=7330
EXPOSE 7330
Expand Down
Loading