diff --git a/.gitignore b/.gitignore index cf10230..f445ed2 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ znc/conf/ itunes/iTunesSetup.exe yubikey/ +kiwi-builder/artifacts diff --git a/kiwi-builder/Dockerfile b/kiwi-builder/Dockerfile new file mode 100644 index 0000000..19dfa4b --- /dev/null +++ b/kiwi-builder/Dockerfile @@ -0,0 +1,19 @@ +FROM opensuse + +RUN zypper ar http://download.opensuse.org/repositories/Virtualization:/Appliances/openSUSE_12.3 virtualization:appliances \ + && zypper --non-interactive install \ + kiwi \ + kiwi-doc \ + lxc + +ENV HOME /root +WORKDIR /usr/src + +RUN cp -r /usr/share/doc/packages/kiwi/examples/suse-13.1/suse-docker-container /usr/src/ + +COPY config.xml /usr/src/suse-docker-container/ +COPY config.sh /usr/src/suse-docker-container/ + +RUN kiwi --prepare /usr/src/suse-docker-container --root /tmp/suse-rootfs \ + && tar cvpf suse-rootfs.tar -C /tmp/suse-rootfs/ . \ + && mkdir -p artifacts diff --git a/kiwi-builder/Makefile b/kiwi-builder/Makefile new file mode 100644 index 0000000..9febb2c --- /dev/null +++ b/kiwi-builder/Makefile @@ -0,0 +1,13 @@ +.PHONY: all build run clean + +all: run + +build: + @docker build --rm --force-rm -t jess/kiwi-builder . + +run: build + $(shell docker run --rm -v $(CURDIR)/artifacts:/usr/src/artifacts jess/kiwi-builder mv suse-rootfs.tar artifacts) + $(shell docker import artifacts/suse-rootfs.tar jess/opensuse:12.3) + +clean: + @rm -rf artifacts diff --git a/kiwi-builder/config.sh b/kiwi-builder/config.sh new file mode 100644 index 0000000..3d80847 --- /dev/null +++ b/kiwi-builder/config.sh @@ -0,0 +1,49 @@ +#!/bin/bash +#================ +# FILE : config.sh +#---------------- +# PROJECT : OpenSuSE KIWI Image System +# COPYRIGHT : (c) 2013 SUSE LLC +# : +# AUTHOR : Robert Schweikert +# : +# BELONGS TO : Operating System images +# : +# DESCRIPTION : configuration script for SUSE based +# : operating systems +# : +# : +# STATUS : BETA +#---------------- +#====================================== +# Functions... +#-------------------------------------- +test -f /.kconfig && . /.kconfig +test -f /.profile && . /.profile + +#====================================== +# Greeting... +#-------------------------------------- +echo "Configure image: [$kiwi_iname]..." + +#====================================== +# Setup baseproduct link +#-------------------------------------- +suseSetupProduct + +#====================================== +# SuSEconfig +#-------------------------------------- +suseConfig + +#====================================== +# Activate services +#-------------------------------------- +suseActivateDefaultServices + +#====================================== +# Umount kernel filesystems +#-------------------------------------- +baseCleanMount + +exit 0 diff --git a/kiwi-builder/config.xml b/kiwi-builder/config.xml new file mode 100644 index 0000000..cdd24e0 --- /dev/null +++ b/kiwi-builder/config.xml @@ -0,0 +1,40 @@ + + + + + Flavio Castelli + fcastelli@suse.com + openSUSE 12.3 docker container + + + + + + + + + 1.0.0 + zypper + false + true + en_US + us.map.gz + utc + US/Eastern + + + + + + + + + + + + + + + + +