Docker container for ELISA

"Mohammed Billoo" <[email protected]> Tue, 15 Sep 2020 19:03:42 -0400
Newsgroups tech.elisa.lists.linux-safety
Message-ID <CALkjhPoHqB330YO6uFOO3SnHShvF83xMkzzTp5HGnW-XVyJ3GA@mail.gmail.com>
All,

Attached are the files needed to build a Docker container to support
the following tested operations against the latest-ish master (I need
to test it against Shuah's branch):

- checkpatch
- coccicheck
- sparse
- make menuconfig
- make (against the default x86 config)

To build the container, download the attached files to a location on
your local machine and run:
docker build -t elisa-kernel-builder . (the dot at the end is important)

Then checkout  Shuah's kernel to your local machine, cd to that
directory, and do the following:
$> docker run --rm -it -v $PWD:/opt/elisa/kernel -w /opt/elisa/kernel
elisa-kernel-builder <command>

where <command> can be any of the available commands to operate on the
kernel. For example, if I wanted to configure my checkout using the
docker container, I would do:
$> docker run --rm -it -v $PWD:/opt/elisa/kernel -w /opt/elisa/kernel
elisa-kernel-builder make menuconfig

To pass environment variables specify "-e VARNAME=VARVAL". For
example, if I wanted to run just my cocci script:
$> docker run --rm -it -v $PWD:/opt/elisa/kernel -w /opt/elisa/kernel
-e COCCI=scripts/coccinelle/misc/magic_numbers.cocci
elisa-kernel-builder make coccicheck MODE=report

Please continue to hammer away and test the container with other
workflows and find bugs/issues, since I banged this out in a few hours
and didn't thoroughly test this (I wanted to get this out before I
leave for the day).

We still need to figure out how to source control this.
-- 
Mohammed A Billoo
Founder
MAB Labs, LLC
www.mab-labs.com
201-338-2022
Dockerfile (application/octet-stream, 1.5 KB) - not displayed
entrypoint.sh (application/x-shellscript, 48 B)
#!/usr/bin/env bash
set -e

echo "$@"
exec "$@"