|
|
@ -6,7 +6,7 @@ myarch=$(dpkg --print-architecture) |
|
|
|
if test "${arch}" = "amd64"; then |
|
|
|
if test "${arch}" = "amd64"; then |
|
|
|
myarch="amd64|i386" |
|
|
|
myarch="amd64|i386" |
|
|
|
fi |
|
|
|
fi |
|
|
|
mode="deb" |
|
|
|
mode= |
|
|
|
img="mwaeckerlin/ubuntu:latest" |
|
|
|
img="mwaeckerlin/ubuntu:latest" |
|
|
|
repos=() |
|
|
|
repos=() |
|
|
|
keys=() |
|
|
|
keys=() |
|
|
@ -241,35 +241,49 @@ if ! docker exec ${DOCKER_ID} getent passwd $(id -u) > /dev/null 2>&1; then |
|
|
|
docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -g) -d"${HOME}" $(id -un) |
|
|
|
docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -g) -d"${HOME}" $(id -un) |
|
|
|
fi |
|
|
|
fi |
|
|
|
docker exec ${DOCKER_ID} chown $(id -u):$(id -g) "${HOME}" |
|
|
|
docker exec ${DOCKER_ID} chown $(id -u):$(id -g) "${HOME}" |
|
|
|
case $mode in |
|
|
|
if test -z "$mode"; then |
|
|
|
|
|
|
|
case "$targets" in |
|
|
|
|
|
|
|
(*deb*) mode=deb;; |
|
|
|
|
|
|
|
(*rpm*) mode=rpm;; |
|
|
|
|
|
|
|
(*) case "$img" in |
|
|
|
|
|
|
|
(*ubuntu*|*debian*|*mint*) mode=deb;; |
|
|
|
|
|
|
|
(*fedora*|*centos*|*mageia*) mode=rpm;; |
|
|
|
|
|
|
|
(*mingw*|*win*) mode=win;; |
|
|
|
|
|
|
|
(*) mode=deb;; |
|
|
|
|
|
|
|
esac;; |
|
|
|
|
|
|
|
esac |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
case "$mode" in |
|
|
|
(deb|apt|win) |
|
|
|
(deb|apt|win) |
|
|
|
|
|
|
|
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' |
|
|
|
|
|
|
|
PREVENT='libpam-systemd policykit.* colord dconf-service' |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-mark hold ${PREVENT} |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget; |
|
|
|
if [[ "${img}" =~ "ubuntu" ]]; then |
|
|
|
if [[ "${img}" =~ "ubuntu" ]]; then |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} locales |
|
|
|
docker exec ${DOCKER_ID} locale-gen ${LANG} |
|
|
|
docker exec ${DOCKER_ID} locale-gen ${LANG} |
|
|
|
docker exec ${DOCKER_ID} update-locale LANG=${LANG} |
|
|
|
docker exec ${DOCKER_ID} update-locale LANG=${LANG} |
|
|
|
fi |
|
|
|
fi |
|
|
|
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' |
|
|
|
|
|
|
|
PREVENT='libpam-systemd policykit.* colord dconf-service' |
|
|
|
|
|
|
|
for f in ${PREVENT}; do |
|
|
|
for f in ${PREVENT}; do |
|
|
|
docker exec ${DOCKER_ID} bash -c "echo 'Package: ${f}' >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} bash -c "echo 'Package: ${f}' >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" |
|
|
|
done |
|
|
|
done |
|
|
|
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |
|
|
|
if test -n "${keys[@]}"; then # fix dependency bug in cosmic and stretch |
|
|
|
docker exec ${DOCKER_ID} apt-mark hold ${PREVENT} |
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} gnupg |
|
|
|
docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget; |
|
|
|
|
|
|
|
for key in "${keys[@]}"; do |
|
|
|
for key in "${keys[@]}"; do |
|
|
|
wget -O- "$key" \ |
|
|
|
wget -O- "$key" \ |
|
|
|
| docker exec -i ${DOCKER_ID} apt-key add - |
|
|
|
| docker exec -i ${DOCKER_ID} apt-key add - |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
fi |
|
|
|
for repo in "${repos[@]}"; do |
|
|
|
for repo in "${repos[@]}"; do |
|
|
|
ifthenelse "${repo}" "apt-add-repository 'ARG'" |
|
|
|
ifthenelse "${repo}" "apt-add-repository 'ARG'" |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |
|
|
|
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |
|
|
|
for package in "${packages[@]}"; do |
|
|
|
for package in "${packages[@]}"; do |
|
|
|
ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT} ARG" |
|
|
|
ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT} ARG" |
|
|
@ -281,7 +295,7 @@ case $mode in |
|
|
|
;; |
|
|
|
;; |
|
|
|
(rpm|yum|dnf|zypper|urpmi) |
|
|
|
(rpm|yum|dnf|zypper|urpmi) |
|
|
|
if [[ "$img" =~ "centos" ]]; then |
|
|
|
if [[ "$img" =~ "centos" ]]; then |
|
|
|
docker exec ${DOCKER_ID} yum install -y redhat-lsb |
|
|
|
docker exec ${DOCKER_ID} yum install -y redhat-lsb epel-release |
|
|
|
docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' <<EOF |
|
|
|
docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' <<EOF |
|
|
|
[WandiscoSVN] |
|
|
|
[WandiscoSVN] |
|
|
|
name=Wandisco SVN Repo |
|
|
|
name=Wandisco SVN Repo |
|
|
|