Add Docker Image build files

Change-Id: I5bc2d8a7974434e047a1b123d22e11c89035fd46
Google-Bug-Id: 119262489
Signed-Off-by: Avi Kondareddy <avikr@google.com>
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..71a917c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+FROM debian
+RUN apt-get update \
+  && apt-get install -y \
+  build-essential \
+  bc \
+  m4 \
+  bison \
+  flex \
+  python3 \
+  && apt-get clean
+COPY kunit.sh /kunit.sh
+COPY kunitconfig /kunitconfig
+ENTRYPOINT ["/kunit.sh"]
diff --git a/Dockerfile.test b/Dockerfile.test
new file mode 100644
index 0000000..aff51de
--- /dev/null
+++ b/Dockerfile.test
@@ -0,0 +1,4 @@
+FROM gcr.io/kunit-presubmit/kunit
+WORKDIR /kunit
+COPY linux .
+ENV ARTIFACTS /artifacts
diff --git a/kunit.sh b/kunit.sh
new file mode 100755
index 0000000..3ff6ee5
--- /dev/null
+++ b/kunit.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Prow may not create artifacts folder in advance.
+mkdir -p "$ARTIFACTS"
+
+# Include kunitconfig manually until we can pull it from prowjob TODO(avikr)
+cp /kunitconfig ./kunitconfig
+
+# Build and run kernel, parse output, and send details to output log
+python3 ./tools/testing/kunit/kunit.py run > "$ARTIFACTS/kunit.log" 2>&1
+if [[ $? -ne 0 ]]; then
+  echo "Kunit Tool failed to run"
+  exit 1
+fi
+
+echo "KUnit Log"
+echo "============================="
+cat "$ARTIFACTS/kunit.log"
+echo "============================="
diff --git a/kunitconfig b/kunitconfig
new file mode 100644
index 0000000..2e4a4a4
--- /dev/null
+++ b/kunitconfig
@@ -0,0 +1,3 @@
+CONFIG_TEST=y
+CONFIG_TEST_TEST=y
+CONFIG_EXAMPLE_TEST=y