Since I think I’ve diagnosed my own problem, this is more of an FYI.
I tried to get this setup on Windows: https://github.com/wurstmeister/kafka-docker
It failed with errors until I added some commands to the dockerfile along the lines of “RUN chmod +x /usr/bin/start-kafka.sh”. I was confused about why this was necessary, but the answer eventually came to me: If the .sh files were being copied from a Linux system, the execute bit would presumably be already set. But on Windows, there is no such thing as an execute bit for a file.
I’m not sure what is the right answer here. I considered the possibility that docker proper should remove all attributes when copying files on the assumption that one shouldn’t rely on them being set. But I’m not sure that makes sense and even if it did, it’d probably break the world. I also considered that maybe Windows docker should set the execute bit for such files, but that didn’t entirely sit well with me either.