diff options
Diffstat (limited to '')
-rw-r--r-- | taskcluster/docker/debian-raw/Dockerfile | 33 | ||||
-rwxr-xr-x | taskcluster/docker/debian-raw/setup_packages.sh | 13 |
2 files changed, 46 insertions, 0 deletions
diff --git a/taskcluster/docker/debian-raw/Dockerfile b/taskcluster/docker/debian-raw/Dockerfile new file mode 100644 index 0000000000..304bcb0fbe --- /dev/null +++ b/taskcluster/docker/debian-raw/Dockerfile @@ -0,0 +1,33 @@ +# %ARG BASE_IMAGE +FROM $BASE_IMAGE +MAINTAINER Mike Hommey <mhommey@mozilla.com> + +ENV DEBIAN_FRONTEND=noninteractive + +# Set a default command useful for debugging +CMD ["/bin/bash", "--login"] + +COPY setup_packages.sh /usr/local/sbin/ + +# %ARG DIST +# %ARG SNAPSHOT +# Set apt sources list to a snapshot. +RUN for s in debian_$DIST debian_$DIST-updates debian_$DIST-backports debian-security_$DIST/updates; do \ + if [ $s = "debian_jessie-backports" ]; then \ + echo "deb http://snapshot.debian.org/archive/debian-archive/20190328T105444Z/debian/ ${s#*_} main"; \ + else \ + echo "deb http://snapshot.debian.org/archive/${s%_*}/$SNAPSHOT/ ${s#*_} main"; \ + fi; \ + done > /etc/apt/sources.list && \ + ( echo 'quiet "true";'; \ + echo 'APT::Get::Assume-Yes "true";'; \ + echo 'APT::Install-Recommends "false";'; \ + echo 'Acquire::Check-Valid-Until "false";'; \ + echo 'Acquire::Retries "5";'; \ + ) > /etc/apt/apt.conf.d/99taskcluster + +RUN apt-get update && \ + apt-get dist-upgrade && \ + apt-get install \ + apt-transport-https \ + ca-certificates diff --git a/taskcluster/docker/debian-raw/setup_packages.sh b/taskcluster/docker/debian-raw/setup_packages.sh new file mode 100755 index 0000000000..2f61283528 --- /dev/null +++ b/taskcluster/docker/debian-raw/setup_packages.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +TASKCLUSTER_ROOT_URL=$1 +shift + +# duplicate the functionality of taskcluster-lib-urls, but in bash.. +queue_base="$TASKCLUSTER_ROOT_URL/api/queue/v1" + + +for task in "$@"; do + echo "adding package source $queue_base/task/$task/artifacts/public/build/" + echo "deb [trusted=yes] $queue_base/task/$task/artifacts/public/build/ debian/" > "/etc/apt/sources.list.d/99$task.list" +done |