Well, my bad, got it working with a tip from a colleague. And reviewing the Dockerfile reference online, it appears the “proper” way to add/copy files to a directory is to add a trailing “/” for the directory. So I was doing it improperly all along.
Interesting though how it still works for docker on Mac but not in CircleCI. Weird of docker. Perhaps different versions/implementations are more lenient or strict with the dockerfile spec.
It’s sad that (technically) from the spec docker can’t “infer” a directory like how linux does even if you don’t supply a trailing forward slash. And why is it not picky about that trailing slash in other commands like WORKDIR (just because it doesn’t deal with files I guess)?