diff --git a/docker/dropshell_alpine/Dockerfile.build b/docker/Dockerfile.build similarity index 86% rename from docker/dropshell_alpine/Dockerfile.build rename to docker/Dockerfile.build index 61a6c75..fb2a79f 100644 --- a/docker/dropshell_alpine/Dockerfile.build +++ b/docker/Dockerfile.build @@ -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 diff --git a/docker/dropshell_alpine/_create_dropshell.sh b/docker/_create_dropshell.sh old mode 100644 new mode 100755 similarity index 100% rename from docker/dropshell_alpine/_create_dropshell.sh rename to docker/_create_dropshell.sh diff --git a/docker/builld_builder.sh b/docker/builld_builder.sh new file mode 100755 index 0000000..8442104 --- /dev/null +++ b/docker/builld_builder.sh @@ -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 + diff --git a/docker/dropshell_alpine/build.sh b/docker/compile.sh similarity index 83% rename from docker/dropshell_alpine/build.sh rename to docker/compile.sh index 71ec1ee..6167ec2 100755 --- a/docker/dropshell_alpine/build.sh +++ b/docker/compile.sh @@ -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 diff --git a/docker/dropshell_alpine/Dockerfile.run b/docker/dropshell_alpine/Dockerfile.run deleted file mode 100644 index bb540db..0000000 --- a/docker/dropshell_alpine/Dockerfile.run +++ /dev/null @@ -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"] diff --git a/docker/dropshell_alpine/example.sh b/docker/dropshell_alpine/example.sh deleted file mode 100755 index cbb0356..0000000 --- a/docker/dropshell_alpine/example.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ $# -lt 1 ]; then - echo " Use: example " - exit 0 -fi - - -( -cd "$1" -echo ZG9ja2VyIHJ1biAtdHQgLS1ybSAtdi46L3ggZ2l0ZWEuamRlLm56L2ovZHJvcHNoZWxsX2FscGluZSBoYXNoIC94 | base64 -d | bash -) - diff --git a/docker/dropshell_alpine/publish.sh b/docker/dropshell_alpine/publish.sh deleted file mode 100755 index 3745cc2..0000000 --- a/docker/dropshell_alpine/publish.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker push gitea.jde.nz/j/dropshell_alpine:latest diff --git a/docker/dropshell_alpine/output/dropshell_aarch64 b/docker/output/dropshell_aarch64 similarity index 99% rename from docker/dropshell_alpine/output/dropshell_aarch64 rename to docker/output/dropshell_aarch64 index 517b52a..94cda3f 100755 Binary files a/docker/dropshell_alpine/output/dropshell_aarch64 and b/docker/output/dropshell_aarch64 differ diff --git a/docker/dropshell_alpine/output/dropshell_x86_64 b/docker/output/dropshell_x86_64 similarity index 99% rename from docker/dropshell_alpine/output/dropshell_x86_64 rename to docker/output/dropshell_x86_64 index c2acdd1..9e7ef54 100755 Binary files a/docker/dropshell_alpine/output/dropshell_x86_64 and b/docker/output/dropshell_x86_64 differ diff --git a/docker/publish_builder.sh b/docker/publish_builder.sh new file mode 100755 index 0000000..4bfb0ef --- /dev/null +++ b/docker/publish_builder.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker push gitea.jde.nz/j/dropshell_builder:latest