Repository navigation
docs(docker): remove deprecated version field from docker-compose examples - #174
andrerfneves wants to merge 1 commit into
Conversation
…mples The version field in docker-compose.yml files is deprecated in Docker Compose v2 and generates warnings when present. The field was only required by the v1 Python CLI. Docker Compose v2 ignores it entirely. - Remove version: '3.8' from the basic docker-compose example - Remove version: '3.8' from the SSL reverse proxy docker-compose example
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e0ffe6287
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```yaml | ||
| version: '3.8' | ||
|
|
||
| services: |
There was a problem hiding this comment.
Keep compose examples compatible with docker-compose
In environments where users follow the documented docker-compose up -d command in this section with the legacy Python docker-compose binary (<1.27), dropping the top-level version makes this be interpreted as file-format v1; Docker’s history docs describe v1 as the hyphenated docker-compose CLI and note that file format 1 lacks a top-level services key, while optional version is a Compose v2/v5 behavior. This example will fail for those users unless the commands are also changed to docker compose or the version line is retained.
Useful? React with 👍 / 👎.
Summary
Removes the deprecated
versionfield from docker-compose configuration examples in deployment documentation.Problem
version: '3.8'versionfield is deprecated in Docker Compose v2 (the current standard)WARN[0000] ./docker-compose.yml: \version` is obsolete`docker-composecommand invocations todocker compose, but the compose file content still had the deprecated fieldChanges
version: '3.8'+ servicesversion: '3.8'+ servicesVerification
versionfield is purely cosmetic in Docker Compose v2+ — removing it causes no behavioral change