aboutsummaryrefslogtreecommitdiff
path: root/trusty-i386-tcwg-base
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-02-24 15:23:59 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-02-24 15:23:59 +0000
commitb503f7bdbbbe1e0645626748e6394e2ede8fd087 (patch)
tree1ae9989dbea7622e7af667c70cd6160727514872 /trusty-i386-tcwg-base
parent6efeb7048987e14719ccc7814897e33409f71de8 (diff)
*-tcwg-base: Add new "tcwg-base" images as copies of "tcwg-build" images.
"tcwg-build" and "tcwg-dev" images will be re-based on top of "tcwg-base" images in the subsequent commits. Change-Id: Icbda8ed8de438643878627b5c068ac135fa65b43
Diffstat (limited to 'trusty-i386-tcwg-base')
-rw-r--r--trusty-i386-tcwg-base/Dockerfile110
-rwxr-xr-xtrusty-i386-tcwg-base/build.sh19
2 files changed, 129 insertions, 0 deletions
diff --git a/trusty-i386-tcwg-base/Dockerfile b/trusty-i386-tcwg-base/Dockerfile
new file mode 100644
index 00000000..8a9bea6b
--- /dev/null
+++ b/trusty-i386-tcwg-base/Dockerfile
@@ -0,0 +1,110 @@
+FROM linaro/base-i386-ubuntu:trusty
+
+COPY tcwg-buildslave/.ssh /etc/skel/.ssh
+
+RUN echo 'deb http://archive.ubuntu.com/ubuntu trusty main universe' > /etc/apt/sources.list \
+ && apt-get update \
+ && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
+ && dpkg-divert --local --rename --add /sbin/initctl \
+ && ln -s /bin/true /sbin/initctl \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y devscripts \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ alien \
+ autoconf \
+ autogen \
+ automake \
+ bc \
+ bison \
+ build-essential \
+ ccache \
+ ccrypt \
+ byacc \
+ debhelper \
+ dejagnu \
+ dh-autoreconf \
+ dh-translations \
+ distro-info-data \
+ emacs \
+ fakeroot \
+ flex \
+ g++-multilib \
+ gawk \
+ gdb \
+ gdbserver \
+ git \
+ libexpat1-dev \
+ liblzma-dev \
+ libncurses5-dev \
+ libpython2.7-dev \
+ libreadline-dev \
+ libssl-dev \
+ libtcnative-1 \
+ libtool \
+ lzop \
+ make \
+ mingw-w64 \
+ mingw32 \
+ net-tools \
+ netcat \
+ openjdk-7-jdk \
+ openssh-server \
+ python-dev \
+ pxz \
+ qemu-user \
+ rsync \
+ sudo \
+ texinfo \
+ texlive-fonts-recommended \
+ texlive-latex-recommended \
+ time \
+ vim \
+ wget \
+ wine \
+ xz-utils \
+ zip \
+ zlib1g-dev \
+ && apt-get clean \
+ && rm -rf \
+ /var/lib/apt/lists/* \
+ /tmp/* \
+ /var/tmp/*
+
+RUN chmod 0700 /etc/skel/.ssh \
+ && groupadd -g 9000 tcwg-infra \
+ && useradd -m -g tcwg-infra -u 11827 tcwg-buildslave \
+ && rm -rf /etc/skel/.ssh \
+ && echo 'tcwg-buildslave ALL = NOPASSWD: ALL' > /etc/sudoers.d/jenkins \
+ && chmod 440 /etc/sudoers.d/jenkins \
+ && install -D -p -m0755 /usr/share/doc/git/contrib/workdir/git-new-workdir /usr/local/bin/git-new-workdir \
+ && sed -i -e 's:^session *required *pam_loginuid.so:# session required pam_loginuid.so:' /etc/pam.d/sshd \
+ && mkdir -p /var/run/sshd \
+ && sed -i \
+ -e "/.*MaxStartups.*/d" \
+ -e "/.*MaxSesssions.*/d" \
+ && echo "MaxStartups 256" >> /etc/ssh/sshd_config \
+ && echo "MaxSessions 256" >> /etc/ssh/sshd_config \
+ && mkdir -p /home/tcwg-buildslave/workspace \
+ && chown tcwg-buildslave:tcwg-infra /home/tcwg-buildslave/workspace
+
+# Unfortunately, VOLUME doesn't support bind-mounts for portability reasons.
+# Therefore, the bind-mounts for the following paths are configured in
+# the ci.linaro.org's docker plugin.
+# Sources caches (read-only):
+# /home/tcwg-buildslave/snapshots-ref:/home/tcwg-buildslave/snapshots-ref:ro
+# Jenkins .jar cache (read-write):
+# /home/tcwg-buildslave/.jenkins:/home/tcwg-buildslave/.jenkins:rw
+
+# We write most of the data inside workspace, so make it a scratch mount.
+# Note that bind-mounting workspace from host will make jobs with parallel
+# builds fail.
+VOLUME /home/tcwg-buildslave/workspace
+
+# We use ssh multiplexing, which creates sockets in /tmp. Overlayfs,
+# which docker is using can't host sockets, so we use a scratch mount
+# for /tmp. This requires that we add --rm option to "docker run"
+# invocations (e.g., mark "Remove volumes" checkbox in docker plugin) to
+# cleanup host directories used for the scratch mounts.
+VOLUME /tmp
+
+EXPOSE 22
+CMD ["linux32", "/usr/sbin/sshd", "-D"]
diff --git a/trusty-i386-tcwg-base/build.sh b/trusty-i386-tcwg-base/build.sh
new file mode 100755
index 00000000..738c4cdf
--- /dev/null
+++ b/trusty-i386-tcwg-base/build.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+ rm -rf tcwg-buildslave
+}
+
+export LANG=C
+distro=$(basename ${PWD} | cut -f1 -d '-')
+arch=$(basename ${PWD} | cut -f2 -d '-')
+name=$(basename ${PWD} | cut -f3- -d '-')
+
+rsync -a ../tcwg-buildslave/ ./tcwg-buildslave/
+
+docker build --pull --tag=linaro/ci-${arch}-${name}-ubuntu:${distro} .