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