CICD-128 · Show recent container logs
Encyclopedia · Docker runtime and Compose · All snippets
Previous · CICD-127 · Next · CICD-129
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites disposable Docker or Compose project with example web service.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
docker compose logs --no-color --tail 100 web > web.log3. How it works
The command captures project service logs before test resources are removed.
4. Verify the result
Capture before teardown and scrub sensitive log fields.
Validation syntax-validated (Bash parse). Status definitions.