the attribute version is obsolete Docker Origin: Platform & cloud Last updated 13 Oct 2026

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.

Exact message you may see the attribute `version` is obsoleteversion is obsoleteit will be ignored, please remove it to avoid potential confusion
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

  1. Delete the version: line
  2. Keep using the file — the warning is cosmetic

Detailed fix by platform

Docker Compose

  1. bash
    # remove this line
    version: "3.8"
    services:
      web:
        image: nginx

How to diagnose

  1. File — First lines of every compose file in use
  2. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

componentWillMount renamed — Warning: componentWillMount has been renamed, and is not recommended for use. (React)componentWillMount re…compose validation — docker compose: services.x Additional property y is not allowed / yaml: line N: mapping values are not allowed (Docker)compose validationConfig compilation failed — CircleCI: Error calling workflow: 'build'. Cannot find a definition for job named test / Config does not conform to schema (CI/CD)Config compilation fa…config global deprecated — npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. (npm)config global depreca…could not select device driver — could not select device driver "" with capabilities: [[gpu]] (Docker)could not select devi…defaultProps deprecated — Warning: Support for defaultProps will be removed from function components in a future major release. (React)defaultProps deprecat…DEP0005 — DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005) (Node.js)DEP0005DEP0040 — DeprecationWarning: The `punycode` module is deprecated (DEP0040) (Node.js)DEP0040the attri…

Explore the map of this error Full error map →

🧠 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.