mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 02:18:51 +00:00
Increase the depth of the clone by a little to account for there potentially being additonal commits ahead of the latest tag in both web and core repos.
This is not always the case, but it prevents the built docker container having a broken version string Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -61,8 +61,11 @@ COPY crontab.txt /crontab.txt
|
|||||||
ADD --chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd
|
ADD --chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd
|
||||||
|
|
||||||
# download a the main repos from github
|
# download a the main repos from github
|
||||||
RUN git clone --depth 1 --single-branch --branch ${WEB_BRANCH} https://github.com/${WEB_FORK}/web.git /var/www/html/admin && \
|
#if the branch is master we reset to the latest tag as sometimes the master branch contains meta changes that have not been tagged.
|
||||||
git clone --depth 1 --single-branch --branch ${CORE_BRANCH} https://github.com/${CORE_FORK}/pi-hole.git /etc/.pihole
|
RUN git clone --depth 5 --single-branch --branch ${WEB_BRANCH} https://github.com/${WEB_FORK}/web.git /var/www/html/admin && \
|
||||||
|
if [ "${WEB_BRANCH}" = "master" ]; then cd /var/www/html/admin && git reset --hard "$(git describe --tags --abbrev=0)"; fi && \
|
||||||
|
git clone --depth 5 --single-branch --branch ${CORE_BRANCH} https://github.com/${CORE_FORK}/pi-hole.git /etc/.pihole && \
|
||||||
|
if [ "${CORE_BRANCH}" = "master" ]; then cd /etc/.pihole && git reset --hard "$(git describe --tags --abbrev=0)"; fi
|
||||||
|
|
||||||
RUN cd /etc/.pihole && \
|
RUN cd /etc/.pihole && \
|
||||||
install -Dm755 -d /opt/pihole && \
|
install -Dm755 -d /opt/pihole && \
|
||||||
|
|||||||
Reference in New Issue
Block a user