Remove deprecated 'version' key from docker-compose.yml #240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was changed
One-liner to remove
version: '3.8'from thedocker-compose.ymlfile.Why?
When you run
docker-compose upyou get this warning in the terminal:It seems harmless, but adds some mild friction to the getting started experience, and can lead people newer to Temporal / Docker to wonder if they're doing something wrong.
As to why this innocuous line is throwing a warning in the first place, according to AI™ it sounds like as of Docker Compose V2+ Docker Compose no longer uses a fixed "spec version" and instead is based on the Compose Specification, a living standard that is continuously updated. In said standard, Version is marked obsolete.
And while we could keep it around for posterity for the sake of people using Docker Compose V1, according to https://docs.docker.com/compose/releases/migrate/ security updates ended for V1 in July 2021, which was quite awhile ago now.
(There are some other things from that migration guide we could incorporate here; for example apparently now it's recommended to use
docker composeinstead ofdocker-compose) but I figured I would test the waters with this PR first before diving in further. :)Checklist
Re-ran
docker-compose upas indicated in the project README and confirmed not only that the warning didn't show up anymore, but also that the script worked as intended.Nope.