buildin' dropshell
This commit is contained in:
parent
ff43e4122a
commit
92f023f611
18
docker/dropshell_alpine_builder/Dockerfile
Normal file
18
docker/dropshell_alpine_builder/Dockerfile
Normal 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"]
|
18
docker/dropshell_alpine_builder/build.sh
Normal file
18
docker/dropshell_alpine_builder/build.sh
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user