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.
the attribute `version` is obsoleteversion is obsoleteit will be ignored, please remove it to avoid potential confusion 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 compilation failed CircleCI: Error calling workflow: 'build'. Cannot find a definition for job named test / Config does not conform to schema
Most viewed in Docker
- docker-credential-desktop error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
- did not complete successfully failed to solve: process "/bin/sh -c ..." did not complete successfully: exit code: 1
- lookup registry-1.docker.io: no such host dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026