summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bütow <pbuetow@mimecast.com>2018-12-19 16:29:02 +0000
committerPaul Bütow <pbuetow@mimecast.com>2018-12-19 16:29:02 +0000
commit2de8687de485717a6a2b12bc186f03e4c9d7b5ab (patch)
tree6856cd49db85c4106d6af5a0165ceb8dd1391356
parent5c766d32cb04dbceeaddf97c8f3b5f058eaecab8 (diff)
initial docker build support
-rw-r--r--.gitignore1
-rw-r--r--Dockerfile.in11
-rw-r--r--Makefile9
-rw-r--r--README.md11
4 files changed, 30 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 07f2f4b..d2ac6cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ docs/latex/
ioriot/ioriot
ioriot/tags
systemtap/downloads/
+Dockerfile
diff --git a/Dockerfile.in b/Dockerfile.in
new file mode 100644
index 0000000..689c831
--- /dev/null
+++ b/Dockerfile.in
@@ -0,0 +1,11 @@
+FROM centos:7
+
+RUN yum install -v -y gcc systemtap yum-utils
+ENV KERNEL KERNELVERSION
+RUN yum install -v -y kernel-${KERNEL}
+RUN debuginfo-install -v -y kernel-${KERNEL}
+
+ADD ./ /ioriot
+WORKDIR /ioriot
+VOLUME /opt
+
diff --git a/Makefile b/Makefile
index 7e7099d..0784785 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,11 @@
+KERNEL ?= $(shell uname -r)
DESTDIR=/opt/ioriot
all:
- $(MAKE) -C systemtap
$(MAKE) -C ioriot
+ $(MAKE) -C systemtap
install:
- $(MAKE) -C systemtap install
$(MAKE) -C ioriot install
+ $(MAKE) -C systemtap install
uninstall:
test ! -z $(DESTDIR) && test -d $(DESTDIR) && rm -Rfv $(DESTDIR) || exit 0
deinstall: uninstall
@@ -19,3 +20,7 @@ doxygen:
doxygen ./docs/doxygen.conf
test:
$(MAKE) -C ioriot test
+dockerbuild:
+ sed s/KERNELVERSION/$(KERNEL)/ Dockerfile.in > Dockerfile
+ docker build . -t ioriot:$(KERNEL)
+ docker run -it ioriot:$(KERNEL) --entrypoint /bin/bash -c 'make'
diff --git a/README.md b/README.md
index 941e1df..44afb2d 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,17 @@ sudo ioriot -P # purges all test files created by ioriot
sudo make uninstall
```
+# Compiling I/O Riot using Docker
+
+In case there is no suitable build host for I/O Riot it is possible to use Docker to do the job. In order to build everything for CentOS 7 and Linux Kernel 3.10.0-957.1.3.el7.x86_64 just run:
+
+```sh
+export KERNEL=3.10.0-957.1.3.el7.x86_64
+make dockerbuild
+```
+
+Once done you can distribute ``docker/$KERNEL/opt/ioriot`` to ``/opt/ioriot`` to all boxes with that particular running kernel.
+
# Operating I/O Riot
## 1. Capture