For the command line tool in the docker section (here). You tell that the command to use is
docker run -i tdewolff/minify
echo "(function(){ if (a == false) { return 0; } else { return 1; } })();" | minify --type js
That command will return the error with the latest docker image:
ERROR: must specify --bundle for multiple input files with stdout destination
That's because the ENTRYPOINT of your container is the minify command and the real command run in the container this
minify echo "(function(){ if (a == false) { return 0; } else { return 1; } })();"
Remark: the minify command is not run in the container because of the pipe
To correct that I think there is two way.
-
Removing the ENTRYPOINT and replace it with a CMD or with nothning (as the container willn't do any thing if nothing is given.
I don't thing it's a good solution because it will break things when peoples update to the latest vestion of the container.
-
The other solution is to precise in the documentation what is the entrypoint and the cmd in the container. With that peoples will be able to overwrite the ENTRYPOINT in the command line with the --entrypoint option.
The full command must be
docker run -i --entrypoint "" tdewolff/minify sh -c 'echo "(function(){ if (a == false) { return 0; } else { return 1; } })();" | minify --type js'
Remark: the command run in the container is sh -c 'echo "(function(){ if (a == false) { return 0; } else { return 1; } })();" | minify --type js'. This is for executing the pipe inside the container.
For the command line tool in the docker section (here). You tell that the command to use is
That command will return the error with the latest docker image:
That's because the
ENTRYPOINTof your container is theminifycommand and the real command run in the container thisTo correct that I think there is two way.
Removing the
ENTRYPOINTand replace it with aCMDor with nothning (as the container willn't do any thing if nothing is given.I don't thing it's a good solution because it will break things when peoples update to the latest vestion of the container.
The other solution is to precise in the documentation what is the entrypoint and the cmd in the container. With that peoples will be able to overwrite the
ENTRYPOINTin the command line with the--entrypointoption.The full command must be