All working.
This commit is contained in:
parent
e6ed77dd78
commit
10050f0c27
@ -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
|
||||
|
0
docker/dropshell_alpine/_create_dropshell.sh → docker/_create_dropshell.sh
Normal file → Executable file
0
docker/dropshell_alpine/_create_dropshell.sh → docker/_create_dropshell.sh
Normal file → Executable file
8
docker/builld_builder.sh
Executable file
8
docker/builld_builder.sh
Executable 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
|
||||
|
@ -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
|
||||
|
@ -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"]
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo " Use: example <dir>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
(
|
||||
cd "$1"
|
||||
echo ZG9ja2VyIHJ1biAtdHQgLS1ybSAtdi46L3ggZ2l0ZWEuamRlLm56L2ovZHJvcHNoZWxsX2FscGluZSBoYXNoIC94 | base64 -d | bash
|
||||
)
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker push gitea.jde.nz/j/dropshell_alpine:latest
|
Binary file not shown.
Binary file not shown.
3
docker/publish_builder.sh
Executable file
3
docker/publish_builder.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker push gitea.jde.nz/j/dropshell_builder:latest
|
Loading…
x
Reference in New Issue
Block a user