We have PATH set on our build slaves (via configure -> Node properties -> Environment Variables) that won't work in most docker containers. Specifically, we use /usr/local/bin:/a/bin. Note how /usr/bin and /bin aren't in the PATH (which is where cat usually is located.
Normally, the docker.inside() command's docker run isn't setting the -e PATH=... flag. But every so often it uses the PATH from the build slave configuration which causes the docker run to not find cat
I was able to track this down by modifying docker-workflow to not mask the PATH: https://github.com/jenkinsci/docker-workflow-plugin/pull/96
I don't know what the expected behavior (overriding the PATH on a container seems like a "Bad Idea", since the container may-or-may-not be in LSB/POSIX layout) is supposed to be.
It is clear that this random flipping between behaviors is bad.