docker-compose
docker-compose copied to clipboard
passing env object causes issues
I'm using docker-desktop on windows and having issues when trying to pass an env object to any compose command.
Happens even if env is just an empty object
Its not a major issue because in my case I can fall back to regular docker commandOptions instead of defining env, but still wanted to let you know.
demo logs:
$ docker [ 'compose', 'up', '-d', 'myservice' ] {
cwd: 'C:\\path\\to\\compose\\config',
env: {}
}
E: myservice: unknown shorthand flag: 'd' in -d
works with env: undefined:
$ docker [ 'compose', 'up', '-d', 'myservice' ] {
cwd: 'C:\\path\\to\\compose\\config',
env: undefined
}
E: myservice: Network mynetwork Creating
E: myservice:
E: myservice: Network mynetwork Created
E: myservice:
E: myservice: Network mynetwork Starting
E: myservice:
E: myservice: Network mynetwork Started
@alex-Symbroson Thanks for reporting!
Getting the same on a LINUX SUSE OS:
export async function up(directory: string): Promise<void> {
await compose.upAll({ cwd: directory, log: true });
}
exitCode: 125,
err: "unknown shorthand flag: 'd' in -d\n" +
"See 'docker --help'.\n" +
'\n' +
'Usage: docker [OPTIONS] COMMAND\n' +
'\n' +
'A self-sufficient runtime for containers\n' +
'\n' +
...