From de4970e14c7677455c0442059520250959f02d01 Mon Sep 17 00:00:00 2001 From: gdm85 Date: Tue, 10 Jun 2014 12:30:30 +0200 Subject: [PATCH] * script for creation of trusty-kbuilder image --- docker/scripts/build-trusty.sh | 1 - docker/scripts/create-trusty-kbuilder.sh | 26 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 docker/scripts/create-trusty-kbuilder.sh diff --git a/docker/scripts/build-trusty.sh b/docker/scripts/build-trusty.sh index b9be3ba..4a44576 100755 --- a/docker/scripts/build-trusty.sh +++ b/docker/scripts/build-trusty.sh @@ -6,7 +6,6 @@ BASENAME=$(dirname $(readlink -m $0)) -## the distro we are going to use ## the distro we are going to use DISTNAME=trusty REPOSRC=http://archive.ubuntu.com/ubuntu/ diff --git a/docker/scripts/create-trusty-kbuilder.sh b/docker/scripts/create-trusty-kbuilder.sh new file mode 100755 index 0000000..655731b --- /dev/null +++ b/docker/scripts/create-trusty-kbuilder.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +BASENAME=$(dirname $(readlink -m $0)) + +cd $BASENAME/../trusty-kbuilder || exit $? + +if [ ! -f authorized_keys ]; then + echo "No authorized_keys file found in $PWD" + if [ -f ~/.ssh/id_rsa.pub ]; then + echo "Do you want to use ~/.ssh/id_rsa.pub? (y/n)" + read -r ANSWER + if [[ "$ANSWER" == "y" ]]; then + cp -v ~/.ssh/id_rsa.pub authorized_keys || exit $? + else + exit 1 + fi + else + exit 1 + fi +fi + +##NOTE: can leave behind a running container of gitian-host +docker build --tag=gdm85/trusty-kbuilder . && \ +echo "Ubuntu Trusty kernel builder image created successfully!" && \ +echo "You can now spawn containers with:" && \ +echo "docker run -d gdm85/trusty-kbuilder"