Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Docker-Compose #4020

Merged
merged 6 commits into from
Jan 25, 2021
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 54 additions & 4 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,16 @@ DietPi-Software will decrypt and use it for software installs. You can change it
aSOFTWARE_ONLINEDOC_URL[$software_id]='p=29377#p29377'
# - Bullseye
aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0
#------------------
software_id=134

aSOFTWARE_NAME[$software_id]='Docker Compose'
aSOFTWARE_DESC[$software_id]='Tool to defining and run multi-container Docker applications'
aSOFTWARE_TYPE[$software_id]=0
aSOFTWARE_CATEGORY_INDEX[$software_id]=8
aSOFTWARE_ONLINEDOC_URL[$software_id]='p=xxx#pxxx'
# - Bullseye: https://download.docker.com/linux/debian/dists/
aSOFTWARE_AVAIL_G_DISTRO[$software_id,6]=0

# Remote Access
#--------------------------------------------------------------------------------
Expand Down Expand Up @@ -2238,8 +2248,10 @@ DietPi-Software will decrypt and use it for software installs. You can change it

# Docker
# - Portainer (185)
# - Docker Compose (134)
software_id=162
if ((${aSOFTWARE_INSTALL_STATE[185]} == 1 && ${aSOFTWARE_INSTALL_STATE[$software_id]} < 1 ))
if ((${aSOFTWARE_INSTALL_STATE[185]} == 1 && ${aSOFTWARE_INSTALL_STATE[$software_id]} < 1 ||
${aSOFTWARE_INSTALL_STATE[134]} == 1 && ${aSOFTWARE_INSTALL_STATE[$software_id]} < 1 ))
then
aSOFTWARE_INSTALL_STATE[$software_id]=1
G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed"
Expand Down Expand Up @@ -2381,13 +2393,15 @@ DietPi-Software will decrypt and use it for software installs. You can change it
# - HTPC Manager (155)
# - Google AIY (169)
# - Bazarr (180)
# - Docker Compose
software_id=130
if (( ( ${aSOFTWARE_INSTALL_STATE[118]} == 1 && $G_DISTRO > 4 ) ||
${aSOFTWARE_INSTALL_STATE[139]} == 1 ||
( ${aSOFTWARE_INSTALL_STATE[153]} == 1 && $G_DISTRO > 4 ) ||
${aSOFTWARE_INSTALL_STATE[155]} == 1 ||
${aSOFTWARE_INSTALL_STATE[169]} == 1 ||
${aSOFTWARE_INSTALL_STATE[180]} == 1 )); then
${aSOFTWARE_INSTALL_STATE[180]} == 1 ||
${aSOFTWARE_INSTALL_STATE[134]} == 1 )); then

aSOFTWARE_INSTALL_STATE[$software_id]=1
G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed"
Expand Down Expand Up @@ -5722,7 +5736,7 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin-
INSTALL_URL_ADDRESS=$(curl -sf "$INSTALL_URL_ADDRESS" | mawk -F\" '/browser_download_url.*linux\.tar\.gz/{print $4;exit}')
local fallback_url='https://github.com/Radarr/Radarr/releases/download/v3.0.1.4259/Radarr.master.3.0.1.4259.linux.tar.gz'

# ARMv/
# ARMv7
elif (( $G_HW_ARCH == 2 ))
then
INSTALL_URL_ADDRESS=$(curl -sf "$INSTALL_URL_ADDRESS" | mawk -F\" '/browser_download_url.*linux-core-arm\.tar\.gz/{print $4;exit}')
Expand Down Expand Up @@ -6071,6 +6085,18 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u
G_EXEC_NOFAIL=1 G_EXEC rm DockerInstall.sh

fi

software_id=134 # Docker Compose
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Banner_Installing

# Python build dependencies for aarch64
(( $G_HW_ARCH == 3 )) && G_AGI make gcc

G_EXEC_OUTPUT=1 G_EXEC pip3 install docker-compose

fi

software_id=161 # FuguHub
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then
Expand Down Expand Up @@ -6970,13 +6996,25 @@ exec sudo -u $ha_user dash -c '$ha_pyenv_activation; exec pip3 install -U homeas
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Banner_Installing
# create piwheels config file for ARMv6 and ARMv7
if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 2 )); then

if ! [[ -f '/etc/pip.conf' ]]; then

echo '[global]
extra-index-url=https://www.piwheels.org/simple
' > /etc/pip.conf
Joulinar marked this conversation as resolved.
Show resolved Hide resolved

fi
fi

# Perform pip3 installation
INSTALL_URL_ADDRESS='https://bootstrap.pypa.io/get-pip.py'
G_CHECK_URL "$INSTALL_URL_ADDRESS"
G_AGI python3-dev
G_EXEC curl -sSfL "$INSTALL_URL_ADDRESS" -o get-pip.py
G_EXEC_OUTPUT=1 G_EXEC python3 ./get-pip.py
G_EXEC_NOHALT=1 G_EXEC rm get-pip.py

fi

software_id=150 # Mono runtime
Expand Down Expand Up @@ -15257,6 +15295,15 @@ _EOF_
fi

fi

software_id=134 # Docker Compose
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Banner_Uninstalling

G_EXEC_OUTPUT=1 G_EXEC pip3 uninstall -y docker-compose
Joulinar marked this conversation as resolved.
Show resolved Hide resolved

fi

software_id=164
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then
Expand Down Expand Up @@ -15760,6 +15807,9 @@ _EOF_
Banner_Uninstalling
pip3 uninstall -y pip
G_AGP python3-pip # Pre-v6.32

# Remove piwheels config file
[[ -f '/etc/pip.conf' ]] && rm /etc/pip.conf

fi

Expand Down