summaryrefslogtreecommitdiff
path: root/salt/openbook/baseimage/files
diff options
context:
space:
mode:
Diffstat (limited to 'salt/openbook/baseimage/files')
-rw-r--r--salt/openbook/baseimage/files/Dockerfile4
-rw-r--r--salt/openbook/baseimage/files/build.sh31
-rw-r--r--salt/openbook/baseimage/files/installdeps.sh7
-rw-r--r--salt/openbook/baseimage/files/sources.list54
4 files changed, 96 insertions, 0 deletions
diff --git a/salt/openbook/baseimage/files/Dockerfile b/salt/openbook/baseimage/files/Dockerfile
new file mode 100644
index 0000000..1c02714
--- /dev/null
+++ b/salt/openbook/baseimage/files/Dockerfile
@@ -0,0 +1,4 @@
+FROM ubuntu:xenial
+MAINTAINER Carlos Konstanski <carlos@talligent.com>
+ADD docker-start.tar.xz /
+RUN /installdeps.sh
diff --git a/salt/openbook/baseimage/files/build.sh b/salt/openbook/baseimage/files/build.sh
new file mode 100644
index 0000000..d5cad7a
--- /dev/null
+++ b/salt/openbook/baseimage/files/build.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Do not call directly. Meant to be called from CI build script.
+
+pushd {{ pillar["baseimage"]["build_dir"] }} 2>/dev/null
+
+echo "Creating tmp directory"
+rm -rf tmp
+mkdir tmp
+rm -f docker-start.tar.xz
+
+echo "Populating with custom files"
+rsync -aq data/ tmp/
+
+echo "Repackaging into .xz file"
+tar Jcvf docker-start.tar.xz -C tmp/ .
+
+echo "Deleting existing docker container"
+docker stop {{ pillar["baseimage"]["container_name"] }}
+docker container prune -f
+docker rmi -f {{ pillar["baseimage"]["image_name"] }}
+
+echo "Building docker Ubuntu image"
+docker build -t {{ pillar["baseimage"]["image_name"] }} .
+
+echo "Cleaning up"
+rm -rf tmp
+rm -f docker-start.tar.xz
+
+popd 2>/dev/null
+exit 0
diff --git a/salt/openbook/baseimage/files/installdeps.sh b/salt/openbook/baseimage/files/installdeps.sh
new file mode 100644
index 0000000..1bcccdb
--- /dev/null
+++ b/salt/openbook/baseimage/files/installdeps.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+export DEBIAN_FRONTEND=noninteractive
+apt-get update
+apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
+apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" curl python
+exit 0
diff --git a/salt/openbook/baseimage/files/sources.list b/salt/openbook/baseimage/files/sources.list
new file mode 100644
index 0000000..4e624e5
--- /dev/null
+++ b/salt/openbook/baseimage/files/sources.list
@@ -0,0 +1,54 @@
+# deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
+
+# deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
+# deb http://security.ubuntu.com/ubuntu xenial-security main restricted
+
+# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
+# newer versions of the distribution.
+deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
+
+## Major bug fix updates produced after the final release of the
+## distribution.
+deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team. Also, please note that software in universe WILL NOT receive any
+## review or updates from the Ubuntu security team.
+deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
+deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team, and may not be under a free licence. Please satisfy yourself as to
+## your rights to use the software. Also, please note that software in
+## multiverse WILL NOT receive any review or updates from the Ubuntu
+## security team.
+deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
+deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
+
+## N.B. software from this repository may not have been tested as
+## extensively as that contained in the main release, although it includes
+## newer versions of some applications which may provide useful features.
+## Also, please note that software in backports WILL NOT receive any review
+## or updates from the Ubuntu security team.
+deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
+# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
+
+## Uncomment the following two lines to add software from Canonical's
+## 'partner' repository.
+## This software is not part of Ubuntu, but is offered by Canonical and the
+## respective vendors as a service to Ubuntu users.
+# deb http://archive.canonical.com/ubuntu xenial partner
+# deb-src http://archive.canonical.com/ubuntu xenial partner
+
+deb http://security.ubuntu.com/ubuntu xenial-security main restricted
+# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
+deb http://security.ubuntu.com/ubuntu xenial-security universe
+# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
+deb http://security.ubuntu.com/ubuntu xenial-security multiverse
+# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse