Dockerfile backup script

This commit is contained in:
Alexandre
2021-11-26 13:25:30 +01:00
parent b048364a84
commit 3d52a905f1
11 changed files with 121 additions and 133 deletions

View File

@@ -9,11 +9,11 @@ if [ ! -f "/usr/bin/bashio" ]; then
apt-get clean apt-get clean
apt-get update apt-get update
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
smbclient smbclient
apt-get clean apt-get clean
################### ###################
@@ -26,7 +26,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -9,12 +9,12 @@ if [ ! -f "/usr/bin/bashio" ]; then
apt-get clean && apt-get clean &&
apt-get update && apt-get update &&
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
smbclient \ smbclient \
nginx && nginx &&
apt-get clean apt-get clean
################### ###################
@@ -27,7 +27,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -1,31 +1,30 @@
#!/bin/bash #!/bin/bash
# If dockerfile failed install manually # If dockerfile failed install manually
if [ ! -f "/usr/bin/bashio" ]; then if [ ! -f "/usr/bin/bashio" ]; then
echo "Bashio does not exist, executing script" echo "Bashio does not exist, executing script"
( (
# Remove errors on apt-get # Remove errors on apt-get
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
################ ################
# Install apps # # Install apps #
################ ################
apt-get clean apt-get clean
apt-get update apt-get update
apt-get install -yq --no-install-recommends \ apt-get install -yq --no-install-recommends \
jq \ jq \
curl \ curl \
yamllint yamllint
################### ###################
# Install bashio # # Install bashio #
################## ##################
BASHIO_VERSION=0.13.1 BASHIO_VERSION=0.13.1
mkdir -p /tmp/bashio mkdir -p /tmp/bashio
curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" |
tar -xzf - --strip 1 -C /tmp/bashio tar -xzf - --strip 1 -C /tmp/bashio
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -1,31 +1,30 @@
#!/bin/bash #!/bin/bash
# If dockerfile failed install manually # If dockerfile failed install manually
if [ ! -f "/usr/bin/bashio" ]; then if [ ! -f "/usr/bin/bashio" ]; then
echo "Bashio does not exist, executing script" echo "Bashio does not exist, executing script"
( (
# Remove errors on apt-get # Remove errors on apt-get
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
################ ################
# Install apps # # Install apps #
################ ################
apt-get clean && apt-get clean &&
apt-get update && apt-get update &&
apt-get install -yq --no-install-recommends \ apt-get install -yq --no-install-recommends \
jq \ jq \
curl \ curl \
yamllint yamllint
################### ###################
# Install bashio # # Install bashio #
################## ##################
BASHIO_VERSION=0.13.1 BASHIO_VERSION=0.13.1
mkdir -p /tmp/bashio mkdir -p /tmp/bashio
curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" |
tar -xzf - --strip 1 -C /tmp/bashio tar -xzf - --strip 1 -C /tmp/bashio
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -7,15 +7,15 @@ if [ ! -f "/usr/bin/bashio" ]; then
# Install apps # # Install apps #
################ ################
apk add --no-cache \ apk add --no-cache \
curl \ curl \
jq \ jq \
bash \ bash \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
samba-client \ samba-client \
bind-tools \ bind-tools \
nginx nginx
################### ###################
# Install bashio # # Install bashio #
@@ -33,7 +33,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
######################################## ########################################
mkdir -p -m 777 /config/filebrowser || true mkdir -p -m 777 /config/filebrowser || true
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -9,9 +9,9 @@ if [ ! -f "/usr/bin/bashio" ]; then
apt-get clean && apt-get clean &&
apt-get update && apt-get update &&
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
curl \ curl \
yamllint yamllint
################### ###################
# Install bashio # # Install bashio #
@@ -23,7 +23,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -8,10 +8,10 @@ if [ ! -f "/usr/bin/bashio" ]; then
################ ################
apt-get update apt-get update
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
samba \ samba \
smbclient \ smbclient \
nginx nginx
apt-get -y upgrade cifs-utils apt-get -y upgrade cifs-utils
# Allow UID and GID setting # Allow UID and GID setting
@@ -32,7 +32,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -8,22 +8,22 @@ if [ ! -f "/usr/bin/bashio" ]; then
################ ################
apk update && apk update &&
apk add --no-cache \ apk add --no-cache \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba-client \ samba-client \
samba || samba ||
( (
apt-get clean && apt-get clean &&
apt-get update && apt-get update &&
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
smbclient \ smbclient \
samba samba
) )
################### ###################
@@ -36,7 +36,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -9,20 +9,20 @@ if [ ! -f "/usr/bin/bashio" ]; then
apt-get clean && apt-get clean &&
apt-get update && apt-get update &&
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
smbclient \ smbclient \
samba || samba ||
apk update && apk update &&
apk add --no-cache \ apk add --no-cache \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba-client \ samba-client \
samba samba
################### ###################
# Install bashio # # Install bashio #
@@ -34,7 +34,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -8,31 +8,31 @@ if [ ! -f "/usr/bin/bashio" ]; then
# Install apps # # Install apps #
################ ################
apt-get clean \ apt-get clean \
apt-get update \ apt-get update \
apt-get install -y \ apt-get install -y \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
smbclient \ smbclient \
nginx \ nginx \
coreutils \ coreutils \
openvpn openvpn
apt-get clean apt-get clean
################## ##################
# Install tempio # # Install tempio #
################## ##################
curl -L -f -s -o /usr/bin/tempio \ curl -L -f -s -o /usr/bin/tempio \
"https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \ "https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \
chmod a+x /usr/bin/tempio chmod a+x /usr/bin/tempio
################## ##################
# Install bashio # # Install bashio #
################## ##################
mkdir -p /tmp/bashio \ mkdir -p /tmp/bashio \
curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" |
tar -xzf - --strip 1 -C /tmp/bashio tar -xzf - --strip 1 -C /tmp/bashio
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
@@ -54,12 +54,10 @@ if [ ! -f "/usr/bin/bashio" ]; then
sed -i 's|/downloads/|/share/qBittorrent/|g' /defaults/qBittorrent.conf sed -i 's|/downloads/|/share/qBittorrent/|g' /defaults/qBittorrent.conf
# Remove fixed folders, allows connection to webUI # Remove fixed folders, allows connection to webUI
sed '11,13d' /defaults/qBittorrent.conf \ sed '11,13d' /defaults/qBittorrent.conf
echo 'WebUI\HostHeaderValidation=false' \ echo 'WebUI\HostHeaderValidation=false' >>/defaults/qBittorrent.conf
echo 'WebUI\LocalHostAuth=false' >>/defaults/qBittorrent.conf \ echo 'WebUI\LocalHostAuth=false' >>/defaults/qBittorrent.conf
>>/defaults/qBittorrent.conf
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi

View File

@@ -9,8 +9,8 @@ if [ ! -f "/usr/bin/bashio" ]; then
apt-get clean && apt-get clean &&
apt-get update && apt-get update &&
apt-get install -y \ apt-get install -y \
jq \ jq \
curl && curl &&
apt-get clean apt-get clean
################ ################
@@ -29,7 +29,6 @@ if [ ! -f "/usr/bin/bashio" ]; then
mv /tmp/bashio/lib /usr/lib/bashio mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
) >/dev/null 2>/aaa && \ ) >/dev/null
echo "Bashio installed" | cat /aaa
fi fi