diff --git a/Dockerfile b/Dockerfile index 7f8565e..0f94194 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,16 +8,17 @@ FROM composer:${VERSION_COMPOSER} AS comp FROM alpine/git:${VERSION_GIT} AS upstream ARG APP_GH_ADD_SHA=false ARG APP_GH_REF=refs/heads/develop -ARG GIT_TREE ARG UPSTREAM_URL="https://github.com/librebooking/librebooking" WORKDIR /upstream -COPY --chmod=0755 scripts/clone.sh /usr/local/bin/clone.sh -RUN APP_GH_ADD_SHA=${APP_GH_ADD_SHA} \ - APP_GH_REF=${APP_GH_REF} \ - GIT_TREE=${GIT_TREE} \ - UPSTREAM_URL=${UPSTREAM_URL} \ - /usr/local/bin/clone.sh +RUN <config/custom-version.txt +fi +EOF # Build supercronic FROM golang:trixie AS supercronic @@ -49,6 +50,7 @@ COPY --from=supercronic \ # Copy Librebooking COPY --from=upstream \ --chown=www-data:root --chmod=0775 \ + --exclude=.git* \ /upstream/ /var/www/html/ # Customize the system environment diff --git a/scripts/clone.sh b/scripts/clone.sh deleted file mode 100644 index ced5713..0000000 --- a/scripts/clone.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -eu - -GIT_TREE="$(basename "${APP_GH_REF}")" -git clone "${UPSTREAM_URL}" . -git checkout "${GIT_TREE}" -if [ "${APP_GH_ADD_SHA}" = "true" ]; then - git describe --tags --long >config/custom-version.txt -fi -rm -rf .git