docker-compose build error for nodejs and yarn: [gpg: no valid OpenPGP data found.]

SOLUTION: The problem was that the pubkey for the yarn package could not be read so the solution was to add this line.

RUN cat pubkey.gpg | apt-key add -

Thanks to VictorXLR on github.