docker-compose icon indicating copy to clipboard operation
docker-compose copied to clipboard

upMany commandOption Issue

Open m-a-b-r-a opened this issue 9 months ago • 0 comments

version: "1.2.0"

the code

const result = await compose.upMany(services, {
        cwd: '/dir/myapp',
        commandOptions: ['--no-deps', '--build'],
        log: false,
        callback: (chunk, stream) => {
          const text = chunk.toString('utf8');
          if (stream === 'stderr') {
            LoggerService.log(`[DOCKER ERROR] ${text}`);
          } else {
            LoggerService.log(`[DOCKER LOG] ${text}`);
          }
        },
      });

GOT error

[DOCKER ERROR] unknown flag: --no-deps
See 'docker --help'.
Usage:  docker [OPTIONS] COMMAND

I believe in some cases, the command options are being inserted before the compose subcommand, like this:

docker [commandOptions] compose up

As a result, Docker cannot recognize these flags because they are not valid for the main docker CLI, only for docker compose.

Please verify how the command is being constructed, especially in the handling of commandOptions.

m-a-b-r-a avatar May 31 '25 01:05 m-a-b-r-a