Update Dockerfile

This commit is contained in:
Alexandre
2021-12-10 20:33:16 +01:00
committed by GitHub
parent 0a987b2246
commit 3ecd9c6c3f

View File

@@ -1,45 +1,23 @@
###############
# Build Image #
###############
ARG BUILD_FROM ARG BUILD_FROM
ARG BUILD_VERSION ARG BUILD_VERSION
FROM ${BUILD_FROM} FROM ${BUILD_FROM}
# Base system ################
ENV BASHIO_VERSION=0.14.3 # Modify Image #
ENV BUILD_ARCH=$BUILD_ARCH ################
ARG BUILD_ARCH
ENV PACKAGES="jq \
curl \
cifs-utils \
keyutils \
samba \
smbclient \
nginx \
coreutils \
openvpn"
RUN \ # Environment variables
################ ENV \
# Install apps # DEBIAN_FRONTEND="noninteractive"\
################ LANG="C.UTF-8" \
apt-get clean \ PS1="$(whoami)@$(hostname):$(pwd)$ " \
&& apt-get update \ S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
&& apt-get install -y --no-install-recommends ${PACKAGES} \ S6_CMD_WAIT_FOR_SERVICES=1 \
&& apt-get clean \ TERM="xterm-256color"
\
##############
# STATISTICS #
##############
&& curl -L -f -s -o /tmp/tmp \
"https://github.com/alexbelgium/downloads-tracker/archive/refs/tags/Qbittorrent.zip" \
\
##################
# 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
RUN \ RUN \
######################################## ########################################
@@ -62,21 +40,39 @@ RUN \
&& echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \ && echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \
&& echo 'WebUI\LocalHostAuth=false' >> /defaults/qBittorrent.conf || true && echo 'WebUI\LocalHostAuth=false' >> /defaults/qBittorrent.conf || true
# Copy root filesystem ################
COPY rootfs / # Install apps #
################
# Copy local files
COPY rootfs/ /
VOLUME [ "/data" ] # Manual apps
ENV PACKAGES="jq \
curl \
cifs-utils \
keyutils \
samba \
smbclient \
nginx \
coreutils \
openvpn"
# Environment variables # Automatic apps & bashio
ENV \ RUN $(ls /bin/bash &>/dev/null) || (apt-get install -y --no-install-recommends bash || apk add --no-cache bash) && \
DEBIAN_FRONTEND="noninteractive"\ $(curl --help &>/dev/null) || (apt-get install -y --no-install-recommends curl || apk add --no-cache curl) && \
LANG="C.UTF-8" \ curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \
PS1="$(whoami)@$(hostname):$(pwd)$ " \ chmod 777 /automatic_packages.sh && \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \ /automatic_packages.sh "$PACKAGES" && \
S6_CMD_WAIT_FOR_SERVICES=1 \ rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
TERM="xterm-256color"
##############
# Entrypoint #
##############
##########
# Labels #
##########
### LABELS
ARG BUILD_ARCH ARG BUILD_ARCH
ARG BUILD_DATE ARG BUILD_DATE
ARG BUILD_DESCRIPTION ARG BUILD_DESCRIPTION