mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-01 02:40:31 +02:00
Update Dockerfile
This commit is contained in:
@@ -1,37 +1,45 @@
|
|||||||
|
###############
|
||||||
|
# Build Image #
|
||||||
|
###############
|
||||||
|
|
||||||
ARG BUILD_FROM
|
ARG BUILD_FROM
|
||||||
ARG BUILD_VERSION
|
ARG BUILD_VERSION
|
||||||
FROM techblog/arpspoof-docker:latest
|
FROM techblog/arpspoof-docker:latest
|
||||||
ENV BASHIO_VERSION=0.14.3
|
|
||||||
ENV PACKAGES="jq \
|
|
||||||
curl \
|
|
||||||
iproute2"
|
|
||||||
|
|
||||||
RUN \
|
################
|
||||||
|
# Modify Image #
|
||||||
|
################
|
||||||
|
|
||||||
################
|
################
|
||||||
# Install apps #
|
# 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
|
|
||||||
|
|
||||||
# copy local files
|
# Add rootfs
|
||||||
COPY 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
|
RUN chmod 777 /entrypoint.sh
|
||||||
ENTRYPOINT [ "/usr/bin/env" ]
|
ENTRYPOINT [ "/usr/bin/env" ]
|
||||||
CMD [ "/entrypoint.sh" ]
|
CMD [ "/entrypoint.sh" ]
|
||||||
|
|
||||||
### LABELS
|
##########
|
||||||
|
# Labels #
|
||||||
|
##########
|
||||||
|
|
||||||
ARG BUILD_ARCH
|
ARG BUILD_ARCH
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG BUILD_DESCRIPTION
|
ARG BUILD_DESCRIPTION
|
||||||
|
|||||||
Reference in New Issue
Block a user