From f4ddb607cb26cca034826669a05e2a6a12aa2b9a Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Mon, 5 Feb 2018 17:51:36 -0800 Subject: [PATCH] Dockerfile for building database from scratch Runs all fuzzers to construct a database from scratch. Raw and HTML versions of database are packaged into a docker image that serves the files via nginx. Signed-off-by: Rick Altherr --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a2544951 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +ARG DEV_ENV_IMAGE + +FROM ${DEV_ENV_IMAGE} AS db_builder +ARG NUM_PARALLEL_JOBS=1 + +COPY . /source +RUN cd /source && make -j${NUM_PARALLEL_JOBS} database +RUN find /source/database -mindepth 1 -maxdepth 1 -type d -exec /source/htmlgen/htmlgen.py --settings={}/settings.sh --output=/output/html \; +RUN mkdir -p /output/raw && find /source/database -mindepth 1 -maxdepth 1 -type d -exec cp -R {} /output/raw \; + +FROM nginx:alpine +COPY --from=db_builder /output /usr/share/nginx/html