Building NRK scanner inside Docker on Ubuntu 20.04

In case somebody is interested, here are my scripts to build NRK version of the scanner app inside Docker container on Ubuntu 20.04.

build-scanner script:

docker build --tag casparcg/scanner - <<EOF
    FROM node:12

    WORKDIR /opt
    RUN git clone --depth 1 scanner

    WORKDIR /opt/scanner
    RUN yarn install && yarn run build-linux
    RUN mv ./deploy /scanner

extract-scanner script:

id=$(docker create casparcg/scanner)
docker cp $id:/scanner .
docker rm -v $id

After running both scripts you will have a directory called scanner with binary files in it.