.
This commit is contained in:
parent
374ec773b8
commit
148b590035
@ -6,13 +6,17 @@ RUN apk add --no-cache \
|
||||
git \
|
||||
ncurses-dev \
|
||||
pkgconfig \
|
||||
tbb-dev \
|
||||
xxhash-dev
|
||||
libtbb-dev \
|
||||
xxhash-dev \
|
||||
bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
COPY --chmod=755 docker/dropshell_alpine_builder/_create_dropshell.sh /scripts/
|
||||
|
||||
RUN rm -rf build
|
||||
|
||||
CMD ["/bin/bash","-c","cmake .. -DCMAKE_BUILD_TYPE=Release && make -j4 && cp build/dropshell /output/ && chmod a+rwx /output/dropshell"]
|
||||
# dropshell makesafecmd "cmake .. -DCMAKE_BUILD_TYPE=Release && make -j4 && cp /app/build/dropshell /output/ && chmod a+rwx /output/dropshell"
|
||||
CMD ["/bin/bash","/scripts/_create_dropshell.sh"]
|
||||
|
12
docker/dropshell_alpine_builder/_create_dropshell.sh
Normal file
12
docker/dropshell_alpine_builder/_create_dropshell.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
mkdir -p /app/build
|
||||
cd /app/build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make -j4
|
||||
cp /app/build/dropshell /output/
|
||||
|
||||
chown $CHOWN_USER:$CHOWN_GROUP /output/dropshell
|
||||
|
||||
/app/build/dropshell version
|
@ -2,7 +2,7 @@
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
ROOT_DIR=$(dirname $(dirname $(dirname $SCRIPT_DIR)))
|
||||
ROOT_DIR=$(dirname $(dirname $SCRIPT_DIR))
|
||||
|
||||
echo "Building dropshell from $ROOT_DIR"
|
||||
|
||||
@ -10,9 +10,10 @@ docker build -t dropshell_alpine_builder $ROOT_DIR -f $SCRIPT_DIR/Dockerfile
|
||||
|
||||
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
|
||||
MYUID=$(id -u)
|
||||
MYGID=$(id -g)
|
||||
|
||||
docker run -it --env CHOWN_USER=$MYUID --env CHOWN_GROUP=$MYGID -v $SCRIPT_DIR/output:/output dropshell_alpine_builder
|
||||
|
||||
echo "dropshell built in $SCRIPT_DIR/output/dropshell"
|
||||
|
Loading…
x
Reference in New Issue
Block a user