Open dfdan opened 1 year ago
I can confirm for debian - we had the same issue, which forced me to upgrade to a newer docker version. When checking the system-requirements with invenio-cli they failed due to docker.
In case that this is wanted behaviour due to end of life of the old docker version: we might want to adjust the documentation: https://inveniordm.docs.cern.ch/install/requirements/
EDIT: There are in fact two problems: the first one (described below) is related with obtaining the version of Docker. The second one is about obtaining the version of Docker Compose failing on environments where the command is docker-compose
instead of docker compose
(what is described above).
I am using Docker 20.10.22
(the minimum required Docker version for InvenioRDM is 20.10.10+
according to the documentation), and I am facing the same problem .
This is due to the fact that the command used in the requirements.py
does return json
instead of the expected version with Docker 20:
$ docker version --format json
json
The official Docker documentation mentions the value 'json'
for the --format
option , but later on an example shows the syntax docker version --format '{{json .}}
to output JSON and this syntax works with Docker 20.
However, the best solution in our case which works will all versions would be to follow the examples on how to extract specific information, which is a much simpler since it does not require any JSON parsing:
$ docker version --format '{{.Client.Version}}'
20.10.22
I can create a pull request with this change if you want.
@ptamarit Thanks for looking into this. We love PR's...
Hi all, is there anything new on this issue? Currently users are running into this, see: https://invenio-talk.web.cern.ch/t/installation-error-of-invenio-rdm-in-local-machine-please-solve/351.
In my case, I ran into the second error mentioned by @ptamarit. So I just changed the code in docker_helper.py
locally from:
self.docker_compose = ["docker", "compose"]
to:
self.docker_compose = ["docker-compose"]
But this is clearly not a good workaround for all systems.
Package version (if known): 1.1.0
Describe the bug
With docker 20.10 / docker-compose 1.25.0 (ubuntu 20.04) the docker helper is trying to run 'docker compose' but this command isn't available. It should still be docker-compose in this case.
This causes docker not to be able to start services etc when the helper fails here: https://github.com/inveniosoftware/invenio-cli/blob/40573024e8ad81430afdda8fc8ceb2acbd55d7d2/invenio_cli/helpers/docker_helper.py#L41
Steps to Reproduce
Bootstrap instance with Docker 20.10 (as packaged in Ubuntu 20.04), bootstrap an instance of ~12 and try to start services.
Expected behavior
services should start
Screenshots (if applicable)
Additional context