All working.

This commit is contained in:
Your Name 2025-04-29 23:43:54 +12:00
parent e6ed77dd78
commit 10050f0c27
10 changed files with 16 additions and 50 deletions

View File

@ -14,7 +14,7 @@ WORKDIR /app
COPY . .
COPY --chmod=755 docker/dropshell_alpine/_create_dropshell.sh /scripts/
COPY --chmod=755 docker/_create_dropshell.sh /scripts/
RUN rm -rf build

8
docker/builld_builder.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ROOT_DIR=$(dirname $SCRIPT_DIR)
docker build -t gitea.jde.nz/j/dropshell_builder:latest $ROOT_DIR -f $SCRIPT_DIR/Dockerfile.build

View File

@ -2,12 +2,12 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ROOT_DIR=$(dirname $(dirname $SCRIPT_DIR))
ROOT_DIR=$(dirname $SCRIPT_DIR)
echo "Building dropshell from $ROOT_DIR"
# Build the builder image
docker build -t dropshell_alpine_builder $ROOT_DIR -f $SCRIPT_DIR/Dockerfile.build
#docker build -t dropshell_alpine_builder $ROOT_DIR -f $SCRIPT_DIR/Dockerfile.build
rm -rf $SCRIPT_DIR/output
mkdir -p $SCRIPT_DIR/output
@ -22,7 +22,7 @@ docker run --rm -tt --env CHOWN_USER=$MYUID --env CHOWN_GROUP=$MYGID \
-e TARGET_ARCH=x86_64 \
-e CC=gcc \
-e CXX=g++ \
dropshell_alpine_builder
gitea.jde.nz/j/dropshell_builder:latest
mv $SCRIPT_DIR/output/dropshell $SCRIPT_DIR/output/dropshell_x86_64
@ -38,7 +38,7 @@ docker run --rm -tt --env CHOWN_USER=$MYUID --env CHOWN_GROUP=$MYGID \
-e TARGET_ARCH=aarch64 \
-e CC=aarch64-linux-gnu-gcc \
-e CXX=aarch64-linux-gnu-g++ \
dropshell_alpine_builder
gitea.jde.nz/j/dropshell_builder:latest
mv $SCRIPT_DIR/output/dropshell $SCRIPT_DIR/output/dropshell_aarch64

View File

@ -1,29 +0,0 @@
FROM --platform=$BUILDPLATFORM alpine:latest AS builder
RUN apk add --no-cache \
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/
FROM alpine:latest
RUN apk add --no-cache \
bash \
nano
WORKDIR /app
COPY --from=builder /app/dropshell /app/dropshell
COPY --from=builder /opt/dropshell/templates /opt/dropshell/templates
COPY --from=builder /etc/bash_completion.d/dropshell-completion.bash /etc/bash_completion.d/
RUN /app/dropshell init /config
RUN /app/dropshell version
ENTRYPOINT ["/app/dropshell"]

View File

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

View File

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

3
docker/publish_builder.sh Executable file
View File

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