dropshell_alpine working. Example for xxhash recursive made.
This commit is contained in:
21
docker/dropshell_alpine/Dockerfile.build
Normal file
21
docker/dropshell_alpine/Dockerfile.build
Normal 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"]
|
19
docker/dropshell_alpine/Dockerfile.run
Normal file
19
docker/dropshell_alpine/Dockerfile.run
Normal 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"]
|
12
docker/dropshell_alpine/_create_dropshell.sh
Normal file
12
docker/dropshell_alpine/_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
|
23
docker/dropshell_alpine/build.sh
Executable file
23
docker/dropshell_alpine/build.sh
Executable 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
|
13
docker/dropshell_alpine/example.sh
Executable file
13
docker/dropshell_alpine/example.sh
Executable 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
|
||||
)
|
||||
|
3
docker/dropshell_alpine/publish.sh
Executable file
3
docker/dropshell_alpine/publish.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker push gitea.jde.nz/j/dropshell_alpine:latest
|
Reference in New Issue
Block a user