diff --git a/docker/dropshell_alpine_builder/Dockerfile b/docker/dropshell_alpine_builder/Dockerfile new file mode 100644 index 0000000..4c1ecfc --- /dev/null +++ b/docker/dropshell_alpine_builder/Dockerfile @@ -0,0 +1,18 @@ +FROM alpine:latest + +RUN apk add --no-cache \ + build-base \ + cmake \ + git \ + ncurses-dev \ + pkgconfig \ + tbb-dev \ + xxhash-dev + +WORKDIR /app + +COPY . . + +RUN rm -rf build + +CMD ["/bin/bash","-c","cmake .. -DCMAKE_BUILD_TYPE=Release && make -j4 && cp build/dropshell /output/ && chmod a+rwx /output/dropshell"] diff --git a/docker/dropshell_alpine_builder/build.sh b/docker/dropshell_alpine_builder/build.sh new file mode 100644 index 0000000..bdd2f45 --- /dev/null +++ b/docker/dropshell_alpine_builder/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +ROOT_DIR=$(dirname $(dirname $(dirname $SCRIPT_DIR))) + +echo "Building dropshell from $ROOT_DIR" + +docker build -t dropshell_alpine_builder -context $ROOT_DIR-f $SCRIPT_DIR/Dockerfile $SCRIPT_DIR + +rm -rf $SCRIPT_DIR/output +mkdir -p $SCRIPT_DIR/output +docker run -it -v $SCRIPT_DIR/output:/output dropshell_alpine_builder + +chown $USER:$USER $SCRIPT_DIR/output/dropshell +chmod og-w $SCRIPT_DIR/output/dropshell + +echo "dropshell built in $SCRIPT_DIR/output/dropshell"