Skip to content

Commit d1e0e78

Browse files
committed
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 <[email protected]>
1 parent 7de38f9 commit d1e0e78

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ COPY crontab.txt /crontab.txt
6060
# Add PADD to the container, too.
6161
ADD --chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd
6262

63-
# download a the main repos from github
64-
RUN git clone --depth 1 --single-branch --branch ${WEB_BRANCH} https://github.com/${WEB_FORK}/web.git /var/www/html/admin && \
65-
git clone --depth 1 --single-branch --branch ${CORE_BRANCH} https://github.com/${CORE_FORK}/pi-hole.git /etc/.pihole
63+
# download a the main repos from github
64+
#if the branch is master we reset to the latest tag as sometimes the master branch contains meta changes that have not been tagged.
65+
RUN git clone --depth 5 --single-branch --branch ${WEB_BRANCH} https://github.com/${WEB_FORK}/web.git /var/www/html/admin && \
66+
if [ "${WEB_BRANCH}" = "master" ]; then cd /var/www/html/admin && git reset --hard "$(git describe --tags --abbrev=0)"; fi && \
67+
git clone --depth 5 --single-branch --branch ${CORE_BRANCH} https://github.com/${CORE_FORK}/pi-hole.git /etc/.pihole && \
68+
if [ "${CORE_BRANCH}" = "master" ]; then cd /etc/.pihole && git reset --hard "$(git describe --tags --abbrev=0)"; fi
6669

6770
RUN cd /etc/.pihole && \
6871
install -Dm755 -d /opt/pihole && \

0 commit comments

Comments
 (0)