Closed drfred1981 closed 11 months ago
The check seems to be outdated. I don't know what we should test.
We currently require Compose file v3. Looks like we need:
Hello everybody Sorry if i'm not clear
please see the code in the main branche, as i point at the picture, the character "-" is missing in the spawnCommand, That's the fix for this bug
Best regards
@drfred1981 IFAIK docker-compose
is now an alias for docker compose
.
See:
% docker-compose --help
Usage: docker compose [OPTIONS] COMMAND
Define and run multi-container applications with Docker.
I don't know how this works or if docker-compose
can be used standalone.
@mshima Hello thanks for your answer Docker compose is not a command for docker in my version,
if it "docker compose" must be used as it, i suggest, to add a complementary check based on the required version of docker
here is my client docker version installer on Ubuntu 22.04.3 LTS
try to help best regards
Client: Version: 24.0.5 API version: 1.43 Go version: go1.20.3 Git commit: 24.0.5-0ubuntu1~22.04.1 Built: Mon Aug 21 19:50:14 2023 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.3 Git commit: 24.0.5-0ubuntu1~22.04.1 Built: Mon Aug 21 19:50:14 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.2 GitCommit: runc: Version: 1.1.7-0ubuntu1~22.04.1 GitCommit: docker-init: Version: 0.19.0 GitCommit:
@drfred1981 docker compose
is the official command for docker-compose
v2. Check upstream issue and a possible workaround.
Since we use docker compose
everywhere, we should require docker compose version
to return the version.
jhipster --skip-checks
ignores that error.
Overview of the issue
When running jhispter docker-compose command, version 8.0.0rc1 and above.
getting this error : INFO! Docker is installed
ERROR! Docker Compose 1.6.0 or later is not installed on your computer.
ERROR! An error occured while running jhipster:docker-compose#checkDockerCompose
ERROR! ERROR! Cannot read properties of undefined (reading 'replace')
TypeError: Cannot read properties of undefined (reading 'replace')
Motivation for or Use Case
I've have installed docker-compose, with apt and also wia command line, same bug appeared
Reproduce the error
run : jhispter docker-compose on a jhipster project
Related issues
Suggest a Fix
Edit :
generators/docker-compose/generator.mjs
At line 69 replace : const { stdout, exitCode } = await this.spawnCommand('docker compose version', { reject: false, stdio: 'pipe' }); by const { stdout, exitCode } = await this.spawnCommand('docker-compose version', { reject: false, stdio: 'pipe' });
JHipster Version(s)
JHipster configuration
8.0.0rc1 and above (ive not tried on v 7 and above
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryIs not impacted by entities
Browsers and Operating System
ubuntu