the attribute version is obsolete 🐳 Docker

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

  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:

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