WARN: the attribute `version` is obsolete, it will be ignored
A harmless Compose v2 warning: the top-level version: line in docker-compose.yml is no longer used.
Seen on:
Docker
Meaning
Compose v2 implements the Compose Specification, which ignores version. Delete the line to silence the warning; nothing else changes.
Common causes
- docker-compose.yml still starts with version: "3.8" (or similar)
- Old templates/tutorials copied with the version line
- Compose v2 installed where v1 used to run the same file
⚡ Quick fix
- Delete the version: line
- Keep using the file — the warning is cosmetic
Detailed fix by platform
Docker Compose
- bash
# remove this line version: "3.8" services: web: image: nginx
How to diagnose
- File — First lines of every compose file in use
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- componentWillMount renamed Warning: componentWillMount has been renamed, and is not recommended for use.
- compose validation docker compose: services.x Additional property y is not allowed / yaml: line N: mapping values are not allowed
- config global deprecated npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Most viewed in Docker
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026