buildin' dropshell

This commit is contained in:
Your Name 2025-04-28 22:18:44 +12:00
parent ff43e4122a
commit 92f023f611
2 changed files with 36 additions and 0 deletions

View File

@ -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"]

View File

@ -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"