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:

#!/bin/bash
docker build --tag casparcg/scanner - <<EOF
    FROM node:12

    WORKDIR /opt
    RUN git clone https://github.com/nrkno/tv-automation-media-scanner.git --depth 1 scanner

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

extract-scanner script:

#!/bin/bash
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.

D-mo