Skip to content

Commit

Permalink
Remove some dependencies, move nano & less to the start script and on…
Browse files Browse the repository at this point in the history
…ly intall if env var `INSTALL_DEV_TOOLS` > 0

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
  • Loading branch information
PromoFaux committed Jul 10, 2023
1 parent ef03be0 commit 77ee54c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ FROM alpine:${CONTAINER}
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETPLATFORM

# download a repo from github
# TODO - probably remove a lot of these
RUN apk add --no-cache git \
RUN apk add --no-cache \
git \
bash \
curl \
bind-tools \
Expand All @@ -14,21 +13,11 @@ RUN apk add --no-cache git \
sudo \
unzip \
wget \
libidn \
nettle \
libcap \
openresolv \
iproute2-ss \
jq \
coreutils \
dialog \
newt \
procps \
dhcpcd \
openrc \
ncurses \
nano \
less
procps

# download a the main repos from github
RUN git clone --branch development-v6 https://github.com/pi-hole/AdminLTE.git /var/www/html/admin
Expand Down
5 changes: 5 additions & 0 deletions src/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
fi

# Install editors inside container if requested
if [ "${INSTALL_DEV_TOOLS:-0}" -gt 0 ] ; then
apk add --no-cache nano less
fi

# Remove possible leftovers from previous pihole-FTL processes
rm -f /dev/shm/FTL-* 2> /dev/null
rm -f /run/pihole/FTL.sock
Expand Down

0 comments on commit 77ee54c

Please sign in to comment.