This reproduces an issue with the Unix startup script generated by the Gradle application
plugin.
Build the application with Docker:
docker build -t example .
docker run --env JAVA_OPTS="-Dfoo=bar" example
The application prints the following:
Application was started with -Dfoo=bar
The application prints the following:
/example/bin/example: line 233: xargs: command not found
Application was started with -Dfoo=null