From df0af10250e63af53e84bb27873c958e719e484d Mon Sep 17 00:00:00 2001 From: Richard Silver Date: Thu, 21 Mar 2019 15:15:11 -0700 Subject: [PATCH 1/2] Added build Dockerfile Former-commit-id: e62c6b0ed05811d204637d9cd679d7ef731f8fc7 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..5f2c43011 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:18.04 + +RUN apt-get update \ + && apt-get install -qqy build-essential nasm autotools-dev autoconf libjemalloc-dev \ + && apt-get clean + +CMD make \ No newline at end of file From 3c739e8b1975f36ca26e47d7b1c93b6a5590e92e Mon Sep 17 00:00:00 2001 From: Richard Silver Date: Thu, 21 Mar 2019 16:18:37 -0700 Subject: [PATCH 2/2] updated readme and Dockerfile to allow for tests to be run in container Former-commit-id: 677ae5487f2b68ddd045e5cf2af3c49d625adef6 --- Dockerfile | 5 ++++- README.md | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5f2c43011..36c5621af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ FROM ubuntu:18.04 + + RUN apt-get update \ - && apt-get install -qqy build-essential nasm autotools-dev autoconf libjemalloc-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qqy \ + build-essential nasm autotools-dev autoconf libjemalloc-dev tcl tcl-dev \ && apt-get clean CMD make \ No newline at end of file diff --git a/README.md b/README.md index bcfbb423b..5afe9a394 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,26 @@ Future work: - Allow rebalancing of connections to different threads after the connection - Allow multiple readers access to the hashtable concurrently +Docker Build +------------ + +Run the following commands for a full source download and build: + +``` +git clone git@github.com:JohnSully/KeyDB.git +docker run -it --rm `pwd`/KeyDB:/build -w /build devopsdood/keydb-builder make +``` + +Then you have fresh binaries built, you can also pass any other options to the make command above after the word make. E.g. + +```docker run -it --rm `pwd`/KeyDB:/build -w /build devopsdood/keydb-builder make MAllOC=memkind``` + +The above commands will build you binaries in the src directory. Standard `make install` without Docker command will work after if you wish to install + +If you'd prefer you can build the Dockerfile in the repo instead of pulling the above container for use: + +`docker build -t KeyDB .` + Code contributions -----------------