From b8a9c451d404a74043633875c1b8db68952b9785 Mon Sep 17 00:00:00 2001 From: xis Date: Tue, 31 Oct 2023 17:43:01 +0100 Subject: [PATCH] docker folder --- Dockerfile => docker/Dockerfile | 2 +- docker-build-image.sh => docker/build-image.sh | 10 +++++++++- start.sh => docker/start.sh | 0 3 files changed, 10 insertions(+), 2 deletions(-) rename Dockerfile => docker/Dockerfile (89%) rename docker-build-image.sh => docker/build-image.sh (72%) rename start.sh => docker/start.sh (100%) diff --git a/Dockerfile b/docker/Dockerfile similarity index 89% rename from Dockerfile rename to docker/Dockerfile index e144e0b..e5dfefc 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -12,7 +12,7 @@ RUN set -ex; \ ; \ rm -rf /var/lib/apt/lists/*; -COPY --chmod=775 start.sh /start.sh +COPY --chmod=775 ./docker/start.sh /start.sh EXPOSE 8080 ENTRYPOINT ["/start.sh"] diff --git a/docker-build-image.sh b/docker/build-image.sh similarity index 72% rename from docker-build-image.sh rename to docker/build-image.sh index 8a35a0b..1a7025f 100755 --- a/docker-build-image.sh +++ b/docker/build-image.sh @@ -1,6 +1,10 @@ #!/bin/bash -version=`./gradlew currentVersion | grep "Project version" | awk -F"version: " '{ print $2 }'` +dir=$(realpath "$(dirname "$0")") + +cd "$dir/../" || exit + +version=$(./gradlew currentVersion | grep "Project version" | awk -F"version: " '{ print $2 }') echo "This will create docker image for version $version." read -p "Continue [y/n]? " -n 1 -r @@ -21,9 +25,13 @@ docker buildx inspect --bootstrap docker buildx build \ --push \ --platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --file=./docker/Dockerfile \ --tag=thanek/nextcloud-dlna:$version . docker buildx build \ --push \ --platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --file=./docker/Dockerfile \ --tag=thanek/nextcloud-dlna . + +cd - || exit diff --git a/start.sh b/docker/start.sh similarity index 100% rename from start.sh rename to docker/start.sh