Skip to content

Commit

Permalink
update dockerfiles
Browse files Browse the repository at this point in the history
Signed-off-by: Jessica Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Jan 15, 2016
1 parent cd0d487 commit 7fd9699
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ znc/conf/

itunes/iTunesSetup.exe
yubikey/
kiwi-builder/artifacts
19 changes: 19 additions & 0 deletions kiwi-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions kiwi-builder/Makefile
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions kiwi-builder/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash
#================
# FILE : config.sh
#----------------
# PROJECT : OpenSuSE KIWI Image System
# COPYRIGHT : (c) 2013 SUSE LLC
# :
# AUTHOR : Robert Schweikert <[email protected]>
# :
# 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
40 changes: 40 additions & 0 deletions kiwi-builder/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>

<image schemaversion="6.2" name="suse-12.3-docker-guest">
<description type="system">
<author>Flavio Castelli</author>
<contact>[email protected]</contact>
<specification>openSUSE 12.3 docker container</specification>
</description>
<preferences>
<type image="docker" container="os131">
<machine>
<vmdisk/>
<vmnic interface="eth0" mode="veth"/>
</machine>
</type>
<version>1.0.0</version>
<packagemanager>zypper</packagemanager>
<rpm-check-signatures>false</rpm-check-signatures>
<rpm-force>true</rpm-force>
<locale>en_US</locale>
<keytable>us.map.gz</keytable>
<hwclock>utc</hwclock>
<timezone>US/Eastern</timezone>
</preferences>
<users group="root">
<user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root"/>
</users>
<repository type="yast2">
<source path="opensuse://12.3/repo/oss/"/>
</repository>
<packages type="image">
<package name="coreutils"/>
<package name="iputils"/>
</packages>
<packages type="bootstrap">
<package name="filesystem"/>
<package name="glibc-locale"/>
<package name="module-init-tools"/>
</packages>
</image>

0 comments on commit 7fd9699

Please sign in to comment.