From 9a6406a9a2134e45a609ca4646f45b1cab65b497 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 14 Jun 2018 20:25:35 +0200 Subject: [PATCH] chore: add docker support (#203) --- Dockerfile | 7 +++++++ README.md | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93fe602 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.7 + +RUN apk --update --no-cache add kmod binutils grep perl + +COPY . /check + +ENTRYPOINT ["/check/spectre-meltdown-checker.sh"] diff --git a/README.md b/README.md index df6462a..fa0ddd3 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,13 @@ chmod +x spectre-meltdown-checker.sh sudo ./spectre-meltdown-checker.sh ``` +### Run the script in a docker container + +```shell +docker build -t spectre-meltdown-checker . +docker run --rm --privileged -v /boot:/boot:ro -v /lib/modules:/lib/modules:ro -v /dev/cpu:/dev/cpu:ro spectre-meltdown-checker +``` + ## Example of script output - Intel Haswell CPU running under Ubuntu 16.04 LTS