Docker Community Forums

Share and learn in the Docker community.

Use gradle to save gzip

hey guys,
I have a set up-
local PC with a docker.exe file (no docker installation)
remote server running docker daemon + repo.

I’m using gradle task to save images to the local PC:
project.exec{ ExecSpec exe->
{
exe.commandLine “{docker exe path}”
exe.args “save”, “-o”, “{tag}”, “{output path}”
}
It works and saves a .tar on the PC.
Now I’m trying to save the image compressed with gz/bz/xz, but no matter how i arrange the args, this doesn’t work.
now if i try to do it via cmd , it works:
“{docker exe path} save {tag} | gzip > {output path}”
is it possible to do this using gradle? can anyone help me please.

using Win 7, docker.exe version 18.09.2, gradle version 5.4.1
Thank you very much