|
|
@ -120,7 +120,7 @@ function traperror() { |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ "$wait" -eq 1 ]; then |
|
|
|
if [ "$wait" -eq 1 ]; then |
|
|
|
echo " ... now you can access the docker container:" |
|
|
|
echo " ... now you can access the docker container:" |
|
|
|
echo " docker exec -u $(id -u) ${DOCKER_ID} -it bash" |
|
|
|
echo " docker exec -u $(id -u) -it ${DOCKER_ID} bash" |
|
|
|
echo -n " ... press enter to cleanup: " |
|
|
|
echo -n " ... press enter to cleanup: " |
|
|
|
read |
|
|
|
read |
|
|
|
fi |
|
|
|
fi |
|
|
@ -133,7 +133,7 @@ function traperror() { |
|
|
|
done |
|
|
|
done |
|
|
|
if [ "$wait" -eq 1 ]; then |
|
|
|
if [ "$wait" -eq 1 ]; then |
|
|
|
echo " ... now you can access the docker container:" |
|
|
|
echo " ... now you can access the docker container:" |
|
|
|
echo " docker exec -u $(id -u) ${DOCKER_ID} -it bash" |
|
|
|
echo " docker exec -u $(id -u) -it ${DOCKER_ID} bash" |
|
|
|
echo -n " ... press enter to cleanup: " |
|
|
|
echo -n " ... press enter to cleanup: " |
|
|
|
read |
|
|
|
read |
|
|
|
fi |
|
|
|
fi |
|
|
@ -167,14 +167,20 @@ function ifthenelse() { |
|
|
|
|
|
|
|
|
|
|
|
set -x |
|
|
|
set -x |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' |
|
|
|
docker pull $img |
|
|
|
docker pull $img |
|
|
|
DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -w /workdir $img sleep infinity) |
|
|
|
DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -w /workdir $img sleep infinity) |
|
|
|
trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT |
|
|
|
trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT |
|
|
|
docker exec ${DOCKER_ID} apt-get update |
|
|
|
for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do |
|
|
|
docker exec ${DOCKER_ID} apt-get upgrade -y |
|
|
|
docker exec -it ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} apt-get install -y python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \ |
|
|
|
docker exec -it ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} apt-get install -y software-properties-common apt-transport-https dpkg-dev lsb-release || \ |
|
|
|
docker exec -it ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" |
|
|
|
docker exec ${DOCKER_ID} apt-get install -y python-software-properties apt-transport-https dpkg-dev lsb-release; |
|
|
|
done |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \ |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} software-properties-common apt-transport-https dpkg-dev lsb-release || \ |
|
|
|
|
|
|
|
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties apt-transport-https dpkg-dev lsb-release; |
|
|
|
for repo in "${repos[@]}"; do |
|
|
|
for repo in "${repos[@]}"; do |
|
|
|
ifthenelse "${repo}" "apt-add-repository ARG" |
|
|
|
ifthenelse "${repo}" "apt-add-repository ARG" |
|
|
|
done |
|
|
|
done |
|
|
@ -182,9 +188,9 @@ 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 |
|
|
|
docker exec ${DOCKER_ID} apt-get update |
|
|
|
docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |
|
|
|
for package in "${packages[@]}"; do |
|
|
|
for package in "${packages[@]}"; do |
|
|
|
ifthenelse "${package}" "apt-get install -y --force-yes ARG" |
|
|
|
ifthenelse "${package}" "apt-get install ${OPTIONS} ARG" |
|
|
|
done |
|
|
|
done |
|
|
|
for command in "${commands[@]}"; do |
|
|
|
for command in "${commands[@]}"; do |
|
|
|
ifthenelse "${command}" "ARG" |
|
|
|
ifthenelse "${command}" "ARG" |
|
|
|