我想问我如何使用 withCmd 方法如下:
commands = new String[]{"echo","test:111 | chpasswd"};
ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd("b6b571d5469a")
.withCmd(commands).withAttachStdout(true).withAttachStderr(true).exec();
我正在更改用户密码!但它实际上变成了输出字符串就像我 echo "test:111 | chpasswd"
在linux下执行时我怎样才能让它执行命令echo test:111 | chpasswd