I added the following line into my Dockerfile:
RUN npm set strict-ssl false
This solved the problem for me.