dropshell_alpine working. Example for xxhash recursive made.

This commit is contained in:
Your Name
2025-04-28 23:36:42 +12:00
parent 148b590035
commit ac0b626ae7
9 changed files with 100 additions and 34 deletions

View File

@ -0,0 +1,21 @@
FROM alpine:latest
RUN apk add --no-cache \
build-base \
cmake \
git \
ncurses-dev \
pkgconfig \
libtbb-dev \
xxhash-dev \
bash
WORKDIR /app
COPY . .
COPY --chmod=755 docker/dropshell_alpine/_create_dropshell.sh /scripts/
RUN rm -rf build
CMD ["/bin/bash","/scripts/_create_dropshell.sh"]

View File

@ -0,0 +1,19 @@
FROM alpine:latest
RUN apk add --no-cache \
libtbb \
xxhash-dev \
bash \
nano
WORKDIR /app
COPY docker/dropshell_alpine/output/dropshell /app/dropshell
RUN /bin/bash -c "mkdir -p /opt/dropshell/templates && mkdir -p /config"
COPY templates /opt/dropshell/templates
COPY src/dropshell-completion.bash /etc/bash_completion.d/
RUN /app/dropshell init /config
RUN /app/dropshell version
ENTRYPOINT ["/app/dropshell"]

View 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

View File

@ -0,0 +1,23 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ROOT_DIR=$(dirname $(dirname $SCRIPT_DIR))
echo "Building dropshell from $ROOT_DIR"
docker build -t dropshell_alpine_builder $ROOT_DIR -f $SCRIPT_DIR/Dockerfile.build
rm -rf $SCRIPT_DIR/output
mkdir -p $SCRIPT_DIR/output
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"
docker build -t gitea.jde.nz/j/dropshell_alpine:latest -t dropshell_alpine $ROOT_DIR -f $SCRIPT_DIR/Dockerfile.run
docker run -it dropshell_alpine version

View File

@ -0,0 +1,13 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo " Use: example <dir>"
exit 0
fi
(
cd "$1"
echo ZG9ja2VyIHJ1biAtdHQgLXYuOi94IGdpdGVhLmpkZS5uei9qL2Ryb3BzaGVsbF9hbHBpbmUgaGFzaCAveA== | base64 -d | bash
)

View File

@ -0,0 +1,3 @@
#!/bin/bash
docker push gitea.jde.nz/j/dropshell_alpine:latest