I found the answer to my own question. My Dockerfile specified to use the Alpine Linux OS, which is a minimal OS: FROM node:current-alpine3.10
So it didn’t have git installed by default. By adding this line before the line containing “RUN git clone” it installed git in the container (apk is the package manager for Alpine Linux):