New logic

This commit is contained in:
Alexandre
2021-12-14 13:39:15 +01:00
parent 6df150b341
commit 90f333c40d
269 changed files with 6071 additions and 2163 deletions

View File

@@ -1,4 +1,8 @@
## 4.7.0.19 (14-12-2021)
- Update to latest version from linuxserver/docker-emby
- New standardized logic for Dockerfile build and packages installation
## 4.7.0.18 (20-11-2021)
- Update to latest version from linuxserver/docker-emby

View File

@@ -1,18 +1,18 @@
###############
# Build Image #
###############
#################
# 1 Build Image #
#################
ARG BUILD_FROM
ARG BUILD_VERSION
FROM ${BUILD_FROM}
################
# Modify Image #
################
##################
# 2 Modify Image #
##################
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN \
# Allow UID and GID setting
sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
@@ -24,9 +24,9 @@ RUN \
&& sed -i "s|/config|/emby|g" /etc/services.d/emby/run \
&& sed -i "s|/config|/emby|g" /etc/cont-init.d/30-config
################
# Install apps #
################
##################
# 3 Install apps #
##################
# Copy local files
COPY rootfs/ /
@@ -34,20 +34,20 @@ COPY rootfs/ /
ENV PACKAGES=""
# 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) && \
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \
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 #
##############
################
# 4 Entrypoint #
################
##########
# Labels #
##########
############
# 5 Labels #
############
ARG BUILD_ARCH
ARG BUILD_DATE

View File

@@ -1,6 +1,11 @@
{
"apparmor": true,
"arch": ["aarch64", "amd64", "armv7", "armhf"],
"arch": [
"aarch64",
"amd64",
"armv7",
"armhf"
],
"backup_exclude": [
"*/cache/",
"*/logs/",
@@ -47,7 +52,12 @@
"/dev/nvme1",
"/dev/nvme2"
],
"map": ["config:rw", "share:rw", "media:rw", "ssl:rw"],
"map": [
"config:rw",
"share:rw",
"media:rw",
"ssl:rw"
],
"name": "Emby NAS",
"options": {
"PUID": 0,
@@ -66,7 +76,10 @@
"7359/udp": "udp server discover (optional)",
"1900/udp": "dlna (optional)"
},
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
"privileged": [
"SYS_ADMIN",
"DAC_READ_SEARCH"
],
"schema": {
"PUID": "int",
"PGID": "int",
@@ -81,9 +94,9 @@
},
"slug": "emby_nas",
"startup": "services",
"upstream": "4.7.0.18",
"upstream": "4.7.0.19",
"url": "https://github.com/alexbelgium/hassio-addons",
"version": "4.7.0.18",
"version": "4.7.0.19",
"video": true,
"webui": "http://[HOST]:[PORT:8096]"
}

View File

@@ -2,18 +2,17 @@
# If dockerfile failed install manually
if [ -e "/ENVFILE" ]; then
echo "Executing script"
PACKAGES=$(< /ENVFILE)
PACKAGES=$(</ENVFILE)
(
#######################
# Automatic installer #
#######################
$(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 &>/dev/null || 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 && \
eval /./automatic_packages.sh "$PACKAGES" && \
rm /automatic_packages.sh
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&
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 &&
eval /./automatic_packages.sh "$PACKAGES" &&
rm /automatic_packages.sh
) >/dev/null
fi