From d3a03cf27dab20ee49e2d245f6ca43c98c268cf8 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 14 Feb 2019 04:05:26 +0000 Subject: Refactor --- stage1 | 35 +++++++++++++++++++++++++++++++++++ stage1/Dockerfile | 12 ------------ 2 files changed, 35 insertions(+), 12 deletions(-) create mode 100755 stage1 delete mode 100644 stage1/Dockerfile (limited to 'stage1') diff --git a/stage1 b/stage1 new file mode 100755 index 0000000..a4cfa56 --- /dev/null +++ b/stage1 @@ -0,0 +1,35 @@ +#!/bin/sh - + +set -ex + +# Finish debootstrap (stage0 did debootstrap --foreign) + +sed -i '/mount -t proc /d; /mount -t sysfs /d' /debootstrap/functions +/debootstrap/debootstrap --second-stage + +# The XiLinx tools don't like dash but are OK with bash. + +ln -sf /bin/bash /bin/sh + +# Jump through hoops to install the XiLinx software in this container. + +apt-get update + +apt-get install -y \ + libglib2.0-0 \ + libxrandr2 \ + python-xvfbwrapper \ + ratpoison \ + sudo + +/cryptech-builder/ratinox ise-install + +# Assuming we survived that, we're done with the 6GB +# XiLinxinstallation package. + +rm -rf /Xilinx_ISE_DS_Lin_14.7_1015_1 + +# Create non-root user (with sudo privs, for pbuilder) + +adduser --disabled-password --gecos 'Cryptech Build Bot' --shell /bin/sh builder +echo >/etc/sudoers.d/builder 'builder ALL = (ALL) NOPASSWD: SETENV: ALL' diff --git a/stage1/Dockerfile b/stage1/Dockerfile deleted file mode 100644 index 810ce10..0000000 --- a/stage1/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM cryptech-builder:stage0 - -# Finish debootstrap (stage0 did debootstrap --foreign) - -RUN sed -i '/mount -t proc /d; /mount -t sysfs /d' /debootstrap/functions && \ - /debootstrap/debootstrap --second-stage - -# Our goal here is just to load the XiLinx tarball into a Debian Jessie image. -# Overriding reason for making this a separate image: we don't want to have -# to send 6GB of build context every time we touch a later stage. - -ADD Xilinx_ISE_DS_Lin_14.7_1015_1.tar /xilinx-unpack/ -- cgit v1.2.3