Open Taschi120 opened 7 years ago
The error message comes from the Docker daemon, which is quite reasonable. Do you have an idea on what you actually want, and thinks is a better solution?
In the standard Dockerfile
ENV JAVA_OPTS=""
is quite valid, but there is no way to generate this with the setEnvironment command.
It's not that I need this line to work, I put it in there for future reference mostly. My issue is that there is no logical reason why an empty Java-Opts string shouldn't work and that the error message is rather confusing (ENV has two arguments in my code, after all).
You are correct, this plugin more or less assumes the value is non-empty.
This could probably quite easily be corrected
I have the following bit of code:
When I try to build this, it results in the following error:
This is apparently caused by the empty string in the second argument to setEnvironment. While I can now see how that might be problematic, this is still an edge case that should be covered with a legible error message - or, even better, a setEnvironment call with an empty second argument could just be ignored entirely (as far as I understand), leading to the expected result (an empty / unset environment variable in the container).