Set expectation of Docker compose v2 and update references and compose file appropriately #3973
Labels
🤖 aspect: dx
Concerns developers' experience with the codebase
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: mgmt
Related to repo management and automations
Problem
We now get warnings when running docker compose due to our compose file being an out-of-date format:
Ideally, no one is running compose v1 any more, and it's relatively trivial to install compose v2 binaries even if your regular docker distribution doesn't support it (the worst case is downloading a binary,
chmod +x
it, and copy it to the right location).Continuing to support compose v1 comes with some cruft, including the complex parsing of the
just ps
script, which wasn't able to use the JSON output due to needing to support compose v1.Description
Update our documentation to specifically mention a recent version of compose v2 as the baseline expectation. Update the compose file to fix the warnings and any format changes needed to support compose v2 (should not be any, but might be minor ones). We can update references to
docker-compose
to usedocker compose
in all just scripts to emphasise the lack of support for compose v1 and quickly identify cases where compose v2 is not being used. Even though the compose CLI plugin can be used on it its own, it's easier to block out the possibility of v1 by relying on the CLI plugin functionality.All of that should be relatively simple, so we can also update the script backing
just ps
recipe if we want, or else make an additional issue to do that separately. The current script works with compose v2, but we should be able to delete a fair bit of the more complex code from that script by leveraging compose v2's JSON output rather than the table output ofdocker compose ps
.Additional context
Marked medium rather than low because the flood of warnings in the console are very annoying.
The text was updated successfully, but these errors were encountered: