IntelOwl
IntelOwl copied to clipboard
Failing initialize.sh with docker-compose-plugin (tested with v2.6.0)
What happened
The docker-compose version control comparation fails with docker-compose-plugin installation
Environment
- OS: Ubuntu 20.04 LTS
- IntelOwl version: 3.4.1
- docker-compose-plugin: 2.6.0
What did you expect to happen
It should work because the docker-compose version is greater then 1.23.2
How to reproduce your issue
Follow the installation steps and use docker-compose-plugin previously, instead to use older version 1.29.2 hardcoded in the initialize.sh script
Output of docker-compose --version with docker-compose-plugin version 2.6.0
Docker Compose version v2.6.0
Output expected with docker-compose-version 1.29.2
docker-compose version 1.29.2, build 5becea4c
Error messages and logs
$ docker-compose version Docker Compose version v2.6.0
$ ./initialize.sh This script will check (and possibly guide you through) the installation of dependencies for IntelOwl! Docker version 20.10.17 detected ./initialize.sh: line 30: ((: 10#v2: value too great for base (error token is "10#v2") ./initialize.sh: line 35: ((: 10#v2: value too great for base (error token is "10#v2") Error: Docker-compose version is too old. Please upgrade to at least 1.23.2.
Sampe of update how to get the docker-compose version to work with docker-compose-plugin version v2.6.0 and docker-compose 1.y.z
docker_compose_version=$(docker-compose --version | tr '-' ' ' | cut -d' ' -f4 | cut -d'v' -f2 | cut -d',' -f1)
thanks for reporting this :)
When we added that script, we knew it would not be easy to maintain it but we added it anyway to help people to set up IntelOwl for the first time. If you would be able to fix the bash script, it would be really appreciated :) thank you
Hi @mlodic
It would be a pleasure to update it, but we should include the installation of "docker-compose" without to hardcode the version of it and maybe it would be good to install it using "sudo apt-get install -y docker-compose-plugin" and offer the latest docker-compose version available, do you agree ?
If you agree, it would be a pleasure to open a hotfix branch with the updates and supporting version check for 1.x and 2.x ....
yep that would be great!
Anyway the hardcoded versions are still useful because we provide an official requirements list. So, for instance, if someone finds himself working in a machine with an old version of docker-compose but which is supported, we won't need to tell him to change it. Maybe we could ask him if he would like to upgrade to the newest version anyway but that would just need to be a suggestion.
Understood @mlodic
It makes sense, we could offer "latest" or "recent validated" hardcoded version and offer suggestion to update for people using older docker-compose version 1.x.
PS: Of course, we should/must let the minimum requirement of v1.23.2+
I'll try my best doing it and I will load the hotfix-branch ASAP.
Thanks again.
could you just open a PR? otherwise I can't easily see your changes
should be solved with v4.2.0