Update Dockerfile

This commit is contained in:
Alexandre
2021-12-10 15:25:25 +01:00
committed by GitHub
parent cffe253007
commit 9fd092fc1f

View File

@@ -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