I want to ask how I use the withCmd method as follows:
commands = new String[]{"echo","test:111 | chpasswd"};
ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd("b6b571d5469a")
.withCmd(commands).withAttachStdout(true).withAttachStderr(true).exec();
I am changing the user password!
But it actually becomes the output string
Just like when I execute echo "test:111 | chpasswd"
under linux
How can I make it execute the commandecho test:111 | chpasswd
Why don't you try with a shell command