From 0ca9d2581042b11ff2fb04e9095f033a6edf74a2 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 13 Feb 2019 20:57:24 +0000 Subject: Clean up image names. Integrate license management script. --- Makefile | 10 +++++----- stage1/Dockerfile | 2 +- stage2/Dockerfile | 11 +++++++---- stage2/builder | 6 ++++++ stage2/finish.png | Bin 640 -> 0 bytes stage3/Dockerfile.later | 2 +- 6 files changed, 20 insertions(+), 11 deletions(-) create mode 100755 stage2/builder delete mode 100644 stage2/finish.png diff --git a/Makefile b/Makefile index 2b7a492..b31cb27 100644 --- a/Makefile +++ b/Makefile @@ -5,25 +5,25 @@ build: stage0.stamp stage1.stamp stage2.stamp # stage3.stamp debug: stage2.stamp docker container prune -f mkdir -p framebuf - docker run -it --mount type=bind,source=$(abspath framebuf),target=/framebuf xilinx:installed /xilinx-unpack/installer + docker run -it --mount type=bind,source=$(abspath framebuf),target=/framebuf cryptech-builder:stage2 /xilinx-unpack/builder stage0.stamp: mkdir -p stage0/jessie_chroot cd stage0; sudo /usr/sbin/debootstrap --foreign jessie jessie_chroot - sudo tar -C stage0/jessie_chroot -c . | docker import - xilinx:debootstrap + sudo tar -C stage0/jessie_chroot -c . | docker import - cryptech-builder:stage0 sudo rm -rf stage0/jessie_chroot touch $@ stage1.stamp: stage0.stamp stage1/Dockerfile - cd stage1; docker build -t xilinx:loaded . + cd stage1; docker build -t cryptech-builder:stage1 . touch $@ stage2.stamp: stage1.stamp stage2/Dockerfile - cd stage2; docker build -t xilinx:installed . + cd stage2; docker build -t cryptech-builder:stage2 . touch $@ stage3.stamp: stage2.stamp stage3/Dockerfile - cd stage3; docker build -t cryptech-alpha-builder . + cd stage3; docker build -t cryptech-builder:stage3 . touch $@ clean: diff --git a/stage1/Dockerfile b/stage1/Dockerfile index db6fad3..810ce10 100644 --- a/stage1/Dockerfile +++ b/stage1/Dockerfile @@ -1,4 +1,4 @@ -FROM xilinx:debootstrap +FROM cryptech-builder:stage0 # Finish debootstrap (stage0 did debootstrap --foreign) diff --git a/stage2/Dockerfile b/stage2/Dockerfile index 6b1c170..f9fc768 100644 --- a/stage2/Dockerfile +++ b/stage2/Dockerfile @@ -1,4 +1,4 @@ -FROM xilinx:loaded +FROM cryptech-builder:stage1 RUN ln -sf /bin/bash /bin/sh @@ -8,7 +8,10 @@ RUN apt-get update && apt-get install -y \ python-xvfbwrapper \ ratpoison -COPY installer /xilinx-unpack/ +COPY builder installer licenser /xilinx-unpack/ -#RUN /xilinx-unpack/installer -#RUN rm -rf /xilinx-unpack +# For the moment we're licensing as root. Probably need to change +# that since building as root is a really bad idea. License file goes +# in home directory of user who will be running the builds. + +COPY Xilinx.lic /root diff --git a/stage2/builder b/stage2/builder new file mode 100755 index 0000000..ac3432b --- /dev/null +++ b/stage2/builder @@ -0,0 +1,6 @@ +#!/bin/sh + +set -ex +cd /xilinx-unpack +./installer +./licenser diff --git a/stage2/finish.png b/stage2/finish.png deleted file mode 100644 index 4129820..0000000 Binary files a/stage2/finish.png and /dev/null differ diff --git a/stage3/Dockerfile.later b/stage3/Dockerfile.later index 7f9b257..0cf505c 100644 --- a/stage3/Dockerfile.later +++ b/stage3/Dockerfile.later @@ -1,4 +1,4 @@ -FROM debian:jessie +FROM cryptech-builder:stage3 RUN echo 'deb http://deb.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list -- cgit v1.2.3