add in targetarch

multi_adapter
binhex 1 year ago
parent f00ba21677
commit f46e00fa4c

@ -2,6 +2,8 @@ FROM binhex/arch-int-vpn:latest
LABEL org.opencontainers.image.authors = "binhex"
LABEL org.opencontainers.image.source = "https://github.com/binhex/arch-qbittorrentvpn"
ARG TARGETARCH
# additional files
##################
@ -25,7 +27,7 @@ ADD config/nobody/ /home/nobody/
# make executable and run bash scripts to install app
RUN chmod +x /root/*.sh /home/nobody/*.sh && \
/bin/bash /root/install.sh "${release_tag_name}"
/bin/bash /root/install.sh "${release_tag_name}" "${TARGETARCH}"
# docker settings
#################

@ -8,30 +8,14 @@ release_tag_name="${1//-[0-9][0-9]/}"
# note do NOT download build scripts - inherited from int script with envvars common defined
# detect image arch
####
OS_ARCH=$(cat /etc/os-release | grep -P -o -m 1 "(?=^ID\=).*" | grep -P -o -m 1 "[a-z]+$")
if [[ ! -z "${OS_ARCH}" ]]; then
if [[ "${OS_ARCH}" == "arch" ]]; then
OS_ARCH="x86-64"
else
OS_ARCH="aarch64"
fi
echo "[info] OS_ARCH defined as '${OS_ARCH}'"
else
echo "[warn] Unable to identify OS_ARCH, defaulting to 'x86-64'"
OS_ARCH="x86-64"
fi
# get target arch from Dockerfile argument
TARGETARCH="${2}"
# pacman packages
####
# hack - needs rsync for reflector
pacman -S rsync --noconfirm
# call pacman db and package updater script
source upd.sh
source upd.sh "${TARGETARCH}"
# define pacman packages
pacman_packages="qbittorrent-nox python geoip"

Loading…
Cancel
Save