Skip to content

Commit 2e16c1b

Browse files
authored
Merge pull request #1871 from pi-hole/tweak/README
Add link to "Changed Environment Variables"
2 parents b2064c8 + 39bb4d4 commit 2e16c1b

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
>
3030
> **Pi-hole v6 has been entirely redesigned from the ground up and contains many breaking changes.**
3131
>
32-
> Environment variable names have changed, script locations may have changed.
32+
> [Environment variable names have changed](https://docs.pi-hole.net/docker/upgrading/v5-v6/), script locations may have changed.
3333
>
3434
> If you are using volumes to persist your configuration, be careful.<br>Replacing any `v5` image *(`2024.07.0` and earlier)* with a `v6` image will result in updated configuration files. **These changes are irreversible**.
3535
>

src/Dockerfile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ RUN apk add --no-cache \
3535
libcap \
3636
logrotate \
3737
ncurses \
38-
nmap-ncat \
3938
procps-ng \
4039
psmisc \
4140
shadow \
@@ -61,11 +60,25 @@ COPY crontab.txt /crontab.txt
6160
ADD --chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd
6261

6362
# 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
63+
# if the branch is master we clone the latest tag as sometimes the master branch contains meta changes that have not been tagged
64+
# (we need to create a new "master" branch to avoid the "detached HEAD" state for the version check to work correctly)
65+
66+
RUN clone_repo() { \
67+
FORK="$1"; \
68+
REPO="$2"; \
69+
BRANCH="$3"; \
70+
DEST="$4"; \
71+
CLONE_BRANCH="$BRANCH"; \
72+
if [ "$BRANCH" = "master" ]; then \
73+
CLONE_BRANCH=$(curl -s https://api.github.com/repos/${FORK}/${REPO}/releases/latest | jq -r .tag_name); \
74+
fi; \
75+
git clone --branch "$CLONE_BRANCH" --single-branch --depth 1 "https://github.com/${FORK}/${REPO}.git" "$DEST"; \
76+
cd "$DEST"; \
77+
if [ "$BRANCH" = "master" ]; then git checkout -b master; fi; \
78+
}; \
79+
clone_repo "${WEB_FORK}" "web" "${WEB_BRANCH}" "/var/www/html/admin"; \
80+
clone_repo "${CORE_FORK}" "pi-hole" "${CORE_BRANCH}" "/etc/.pihole"
81+
6982

7083
RUN cd /etc/.pihole && \
7184
install -Dm755 -d /opt/pihole && \

0 commit comments

Comments
 (0)