As dumb as it sounds, looks like yarn is already installed in this docker version of node. So there is no need to install yarn at all.
yarn
Anyway not sure why RUN npm install -g yarn stopped working from one day to another.
RUN npm install -g yarn
RUN set -eux \ & apk add \ --no-cache \ nodejs \ yarn
The latest yarn package is only available in the edge repository. This means, you should install it as follows (including the latest nodejs version):
nodejs
RUN apk --no-cache add nodejs yarn --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community