Sample Docker Compose YAML
A Compose file describing a web service, a database and a cache, with environment variables, ports, volumes, a health check and an anchor that is reused with an alias.
Download
sample-docker-compose.yaml
744 B744 bytes
Download YAML sampleCreated in your browser in a few seconds, then checked against the SHA-256 checksum. The file is not uploaded anywhere. No sign-up.
- Type
- application/yaml
- SHA-256
578f628c06f26f7ca5885e12b3aaf69331e8c5d3a7411161a9c929a166c2e011- Delivery
- Created in your browser from static generator assets (how it works).
Why test with this file
A realistic configuration file for testing YAML parsers, linters and editors.
| Services | 3 |
|---|---|
| Features | Anchors and aliases, sequences, nested mappings, quoted strings, comments |
| Encoding | UTF-8 |
What to check
After your application has processed sample-docker-compose.yaml, confirm that:
- The anchor and its three aliases expand to the same logging settings.
- The quoted port mapping stays a string.
- A linter accepts the file without warnings.
How the file begins
The opening lines of sample-docker-compose.yaml, exactly as they appear in the file.
# Sample Docker Compose file for testing YAML tooling
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "10m"
services:
web:
<<: *defaults
image: nginx:stable
ports:
- "8080:80"Preview
Shows the file contents.
Technical details
| File name | sample-docker-compose.yaml |
|---|---|
| Format | YAML (YAML Ain't Markup Language) |
| Extension | .yaml |
| MIME type | application/yaml |
| Size | 744 bytes (744 B) |
| Kind | Text |
| SHA-256 | 578f628c06f26f7ca5885e12b3aaf69331e8c5d3a7411161a9c929a166c2e011 |
| Created | 2026-10-10 |
| Validation | See the listed size and SHA-256. Small downloads are checked in the browser; verify streamed downloads manually. A hash match does not prove parser compatibility. |
| Preview | Available on this page |
| Source | Generated in your browser by this site's generator; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | Configuration |
Check the stated structure and checksum against your application requirements. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Verify your copy
This file is created in your browser, so it has no direct URL for curl or wget. The generator is designed to produce reproducible bytes. After saving, compare the checksum with the SHA-256 value above.
sha256sum sample-docker-compose.yaml # Linux
shasum -a 256 sample-docker-compose.yaml # macOSOn Windows, run Get-FileHash sample-docker-compose.yaml -Algorithm SHA256 in PowerShell. For scripts and pipelines, save the file once and keep your own copy.
About YAML
Human-friendly data serialisation that relies on indentation. The format of most infrastructure configuration.
Where it fits
- CI/CD pipelines
Fixtures for build, test and deployment pipelines, with checksums for verification.
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
Related files
How to integrate sample docker compose yaml into automated QA suites
Curated fixtures like Sample Docker Compose YAML are built to exercise specific parser branches that generic byte-padded files cannot reach—such as multi-row delimiter escaping, header-vs-trailer structural validation, filename normalization, or media decoder initialization.
- Assert both HTTP status and parsed domain attributes: When uploading or parsing this fixture in Playwright, Cypress, Selenium, or pytest, do not stop at asserting
status === 200. Query your application's API or database afterward to confirm that the exact byte length, SHA-256 digest, filename characters, and internal record/page counts were recorded without silent truncation. - Compare against companion edge cases: Pair this curated sample with its counterpart in our Broken-File QA Test Set or Media Edge Cases collection so your test suite verifies both the valid path and the corresponding error handler.
- Inspect raw bytes locally: You can drop this file directly into our in-browser Magic-Byte File Inspector to view its leading 64-byte hexadecimal dump and verify its SHA-256 checksum without leaving your browser.