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

View File

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

View File

@@ -1,31 +1,30 @@
#!/bin/bash
# If dockerfile failed install manually
# If dockerfile failed install manually
if [ ! -f "/usr/bin/bashio" ]; then
echo "Bashio does not exist, executing script"
(
# Remove errors on apt-get
export DEBIAN_FRONTEND=noninteractive
################
# Install apps #
################
apt-get clean
# Remove errors on apt-get
export DEBIAN_FRONTEND=noninteractive
################
# Install apps #
################
apt-get clean
apt-get update
apt-get install -yq --no-install-recommends \
jq \
curl \
yamllint
jq \
curl \
yamllint
###################
# Install bashio #
##################
BASHIO_VERSION=0.13.1
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
) >/dev/null 2>/aaa && \
echo "Bashio installed" | cat /aaa
###################
# Install bashio #
##################
BASHIO_VERSION=0.13.1
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
) >/dev/null
fi

View File

@@ -1,31 +1,30 @@
#!/bin/bash
# If dockerfile failed install manually
# If dockerfile failed install manually
if [ ! -f "/usr/bin/bashio" ]; then
echo "Bashio does not exist, executing script"
(
# Remove errors on apt-get
export DEBIAN_FRONTEND=noninteractive
################
# Install apps #
################
apt-get clean &&
apt-get update &&
apt-get install -yq --no-install-recommends \
jq \
curl \
yamllint
# Remove errors on apt-get
export DEBIAN_FRONTEND=noninteractive
################
# Install apps #
################
apt-get clean &&
apt-get update &&
apt-get install -yq --no-install-recommends \
jq \
curl \
yamllint
###################
# Install bashio #
##################
BASHIO_VERSION=0.13.1
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
) >/dev/null 2>/aaa && \
echo "Bashio installed" | cat /aaa
###################
# Install bashio #
##################
BASHIO_VERSION=0.13.1
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
) >/dev/null
fi

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -8,31 +8,31 @@ if [ ! -f "/usr/bin/bashio" ]; then
# Install apps #
################
apt-get clean \
apt-get update \
apt-get install -y \
jq \
curl \
cifs-utils \
keyutils \
samba \
smbclient \
nginx \
coreutils \
openvpn
apt-get update \
apt-get install -y \
jq \
curl \
cifs-utils \
keyutils \
samba \
smbclient \
nginx \
coreutils \
openvpn
apt-get clean
##################
# Install tempio #
##################
curl -L -f -s -o /usr/bin/tempio \
"https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \
chmod a+x /usr/bin/tempio
"https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \
chmod a+x /usr/bin/tempio
##################
# Install 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
mv /tmp/bashio/lib /usr/lib/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
# Remove fixed folders, allows connection to webUI
sed '11,13d' /defaults/qBittorrent.conf \
echo 'WebUI\HostHeaderValidation=false' \
echo 'WebUI\LocalHostAuth=false' >>/defaults/qBittorrent.conf \
>>/defaults/qBittorrent.conf
sed '11,13d' /defaults/qBittorrent.conf
echo 'WebUI\HostHeaderValidation=false' >>/defaults/qBittorrent.conf
echo 'WebUI\LocalHostAuth=false' >>/defaults/qBittorrent.conf
) >/dev/null 2>/aaa && \
echo "Bashio installed" | cat /aaa
) >/dev/null
fi

View File

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