intel / Edge-Software-Provisioner

BSD 3-Clause "New" or "Revised" License
42 stars 31 forks source link

Change to apk install of docker-compose #38

Closed dvintel closed 2 years ago

brod-intel commented 2 years ago

What is the reason, for this change?

dvintel commented 2 years ago

Core started failing saying there were outdated versions of python. Update to latest version of docker-compose fixes it. However, the new version of docker-compose changes the way names are generated slightly which requires the other PR as well.

On a related note, if we run the docker ps command, we can grep for the image name rather than relying on the name generated by docker-compose. The ps command returns both, and the image name seems like a safer thing to look for in case they decide to change the way they generate names for instances.

dvintel commented 2 years ago

docker-compose has released another version, 2.9 since 2.8 had a breaking change. From their docs: v2.8.0 ⚠️ Warning notice ⚠️ This release introduced a breaking change via compose-go v1.3.0 and this https://github.com/compose-spec/compose-go/pull/294. Docker Compose will recreate new resources (networks, volumes, secrets, configs...) with new names, using a - instead a _ and try to connect/use to this new created resources instead of your existing ones! Please use Compose v2.9.0 instead

we should update to 2.9.0 instead of 2.8

dvintel commented 2 years ago

After further exploration, we can use apk to install docker-compose rather than pulling it from github repo releases. This has the added benefit of making sure we are using the alpine version of docker-compose