From 9fd092fc1f86b8cba955bbfda66dbf60db5d3c52 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 10 Dec 2021 15:25:25 +0100 Subject: [PATCH] Update Dockerfile --- arpspoof/Dockerfile | 56 ++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/arpspoof/Dockerfile b/arpspoof/Dockerfile index b45475a75..7b62062b6 100644 --- a/arpspoof/Dockerfile +++ b/arpspoof/Dockerfile @@ -1,37 +1,45 @@ +############### +# Build Image # +############### + ARG BUILD_FROM ARG BUILD_VERSION FROM techblog/arpspoof-docker:latest -ENV BASHIO_VERSION=0.14.3 -ENV PACKAGES="jq \ - curl \ - iproute2" -RUN \ - ################ - # Install apps # - ################ - apt-get clean \ - && apt-get update \ - && apt-get install -y ${PACKAGES} \ - \ - ################### - # Install bashio # - ################## - && mkdir -p /tmp/bashio \ - && curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ - | tar -xzf - --strip 1 -C /tmp/bashio \ - && mv /tmp/bashio/lib /usr/lib/bashio \ - && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio || true +################ +# Modify Image # +################ -# copy local files +################ +# Install apps # +################ + +# Add rootfs COPY rootfs/ / -#WORKDIR / + +# Manual apps +ENV PACKAGES="jq curl iproute2" + +# Automatic apps & bashio +RUN $(ls /bin/bash &>/dev/null) || (apt-get install -y --no-install-recommends bash || apk add --no-cache bash) && \ + $(curl --help &>/dev/null) || (apt-get install -y --no-install-recommends curl || apk add --no-cache curl) && \ + curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \ + chmod 777 /automatic_packages.sh && \ + /automatic_packages.sh "$PACKAGES" && \ + rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE + +############## +# Entrypoint # +############## + RUN chmod 777 /entrypoint.sh ENTRYPOINT [ "/usr/bin/env" ] CMD [ "/entrypoint.sh" ] -### LABELS +########## +# Labels # +########## + ARG BUILD_ARCH ARG BUILD_DATE ARG BUILD_DESCRIPTION