Skip to content

Remove obsolete version field from docker-compose.yml#167

Open
mahmoodhamdi wants to merge 1 commit into
sunnah-com:masterfrom
mahmoodhamdi:remove-obsolete-compose-version
Open

Remove obsolete version field from docker-compose.yml#167
mahmoodhamdi wants to merge 1 commit into
sunnah-com:masterfrom
mahmoodhamdi:remove-obsolete-compose-version

Conversation

@mahmoodhamdi
Copy link
Copy Markdown

Summary

Removes the top-level version: '3' key from docker-compose.yml. The field
is no longer used by Compose V2 and triggers an "obsolete" warning on every
docker compose invocation:

the attribute `version` is obsolete, it will be ignored, please remove it
to avoid potential confusion

The rest of the file is already valid Compose Spec syntax (services:,
build:, image:, volumes:, etc.), so no other changes are needed.

Verification

Ran docker compose config against the patched file — it still parses
correctly, expands both services as before, and no longer emits the
deprecation warning.

Note

Independent of #166 (PHP version bump). They can land in either order; both
target the local Docker development path.

The top-level `version` key is no longer used by Compose V2; it triggers
an "obsolete" warning on every `docker compose` invocation. Removing it
makes the file conform to the current Compose Spec without changing any
service definitions.

Validated with `docker compose config`: the file still parses correctly
and the warning is no longer emitted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant