--- /dev/null
+FROM centos:latest
+MAINTAINER jonatanschlag
+
+ENV DEBIAN_FRONTEND noninteractive
+
+ADD setup.sh /tmp/setup.sh
+
+RUN chmod +x /tmp/setup.sh && /tmp/setup.sh
+
+USER psb
+
+# Define default command.
+CMD [""]
+
--- /dev/null
+#!/bin/bash
+. /usr/lib/docker-shell-scripts-lib/tag.sh
+. /usr/lib/docker-shell-scripts-lib/get-id.sh
+. /usr/lib/docker-shell-scripts-lib/preparation.sh
+. /usr/lib/docker-shell-scripts-lib/logging.sh
+. /usr/lib/docker-shell-scripts-lib/install.sh
+
+###
+### Build the pbs Dockerimage
+###
+
+### preparation ###
+# cd into script dir
+(cd $(dirname -- "$(readlink -e -- "$BASH_SOURCE")") || exit
+
+# check for all necessary files
+
+CheckForFile "setup-org.sh"
+CheckForFile "Dockerfile"
+
+#create a work copy of setup.sh
+cp setup-org.sh setup.sh
+### paramter for mariadb build
+repo="ipfire-pbs"
+dockertag="new"
+username=jonatanschlag
+tag="${username}/${repo}:${dockertag}"
+### Build the docker image
+docker build --no-cache=true -t "$tag" .
+### Tag the docker image
+back=$(tag-image "${username}/${repo}")
+
+if [ "error" = "$back" ]; then
+ echo "Tagging was not successful"
+fi
+rm -f setup.sh
+)
--- /dev/null
+#!/bin/bash
+#
+#settings
+#
+="database"
+
+# build the pbs from master branch
+apt-get update -y && apt-get install -y gcc make git
+# add a user
+addgroup --gid 2000 pbs
+adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 pbs
+
+# build the pot
+mkdir -p /opt/dev
+cd /opt/
+git clone -b master http://git.ipfire.org/pub/git/pbs.git
+cd pbs
+# Maybe we have to change the configuration
+#sed -i s/"mysqlpassword"/"$mysql_pass"/g config.h
+#sed -i s/"mysqlhost"/"$mysql_host"/g config.h
+#sed -i s/"authmode"/"$pot_authmode"/g config.h
+#sed -i s/"sleeptime"/"$pot_sleeptime"/g config.h
+
+./configure --prefix=/usr
+make
+make install
+# cleanup
+apt-get remove -y git make gcc
+apt-get autoremove -y
+apt-get clean
+rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /opt/dev/*
+
+# set permissions
--- /dev/null
+FROM centos:latest
+MAINTAINER jonatanschlag
+
+ENV DEBIAN_FRONTEND noninteractive
+
+ADD setup.sh /tmp/setup.sh
+
+RUN chmod +x /tmp/setup.sh && /tmp/setup.sh
+
+USER psb
+
+# Define default command.
+CMD [""]
+
--- /dev/null
+#!/bin/bash
+. /usr/lib/docker-shell-scripts-lib/tag.sh
+. /usr/lib/docker-shell-scripts-lib/get-id.sh
+. /usr/lib/docker-shell-scripts-lib/preparation.sh
+. /usr/lib/docker-shell-scripts-lib/logging.sh
+. /usr/lib/docker-shell-scripts-lib/install.sh
+
+###
+### Build the pbs Dockerimage
+###
+
+### preparation ###
+# cd into script dir
+(cd $(dirname -- "$(readlink -e -- "$BASH_SOURCE")") || exit
+
+# check for all necessary files
+
+CheckForFile "setup-org.sh"
+CheckForFile "Dockerfile"
+
+#create a work copy of setup.sh
+cp setup-org.sh setup.sh
+### paramter for mariadb build
+repo="ipfire-pbs"
+dockertag="new"
+username=jonatanschlag
+tag="${username}/${repo}:${dockertag}"
+### Build the docker image
+docker build --no-cache=true -t "$tag" .
+### Tag the docker image
+back=$(tag-image "${username}/${repo}")
+
+if [ "error" = "$back" ]; then
+ echo "Tagging was not successful"
+fi
+rm -f setup.sh
+)
--- /dev/null
+[database]
+; Credentials to the pakfire build service database.
+
+host = database
+user = pakfire
+pass = pakfire
+db = pakfire
+
+[geoip-database]
+; Credentials to the geoip database.
+
+host = database
+user = pakfire
+pass = pakfire
+db = geoip
--- /dev/null
+#!/bin/bash
+#
+#settings
+#
+="database"
+
+# build the pbs from master branch
+apt-get update -y && apt-get install -y gcc make git
+# add a user
+addgroup --gid 2000 pbs
+adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 pbs
+
+# build the pot
+mkdir -p /opt/dev
+cd /opt/
+git clone -b master http://git.ipfire.org/pub/git/pbs.git
+cd pbs
+# Maybe we have to change the configuration
+#sed -i s/"mysqlpassword"/"$mysql_pass"/g config.h
+#sed -i s/"mysqlhost"/"$mysql_host"/g config.h
+#sed -i s/"authmode"/"$pot_authmode"/g config.h
+#sed -i s/"sleeptime"/"$pot_sleeptime"/g config.h
+
+./configure --prefix=/usr
+make
+make install
+# cleanup
+apt-get remove -y git make gcc
+apt-get autoremove -y
+apt-get clean
+rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /opt/dev/*
+
+# set permissions
--- /dev/null
+FROM centos:latest
+MAINTAINER jonatanschlag
+
+ADD setup.sh /tmp/setup.sh
+
+RUN chmod +x /tmp/setup.sh && /tmp/setup.sh
+
+ADD pbs.conf /opt/pbs/pbs.conf
+
+USER pbs
+
+# Define default command.
+CMD ["/opt/pbs/pakfire-web"]
+
--- /dev/null
+#!/bin/bash
+. /usr/lib/docker-shell-scripts-lib/tag.sh
+. /usr/lib/docker-shell-scripts-lib/get-id.sh
+. /usr/lib/docker-shell-scripts-lib/preparation.sh
+. /usr/lib/docker-shell-scripts-lib/logging.sh
+. /usr/lib/docker-shell-scripts-lib/install.sh
+
+###
+### Build the pbs-web Dockerimage
+###
+
+### preparation ###
+# cd into script dir
+(cd $(dirname -- "$(readlink -e -- "$BASH_SOURCE")") || exit
+
+# check for all necessary files
+
+CheckForFile "setup-org.sh"
+CheckForFile "Dockerfile"
+
+#create a work copy of setup.sh
+cp setup-org.sh setup.sh
+### paramter for mariadb build
+repo="ipfire-pbs-web"
+dockertag="new"
+username=jonatanschlag
+tag="${username}/${repo}:${dockertag}"
+### Build the docker image
+docker build --no-cache=true -t "$tag" .
+### Tag the docker image
+back=$(tag-image "${username}/${repo}")
+
+if [ "error" = "$back" ]; then
+ echo "Tagging was not successful"
+fi
+rm -f setup.sh
+)
--- /dev/null
+[database]
+; Credentials to the pakfire build service database.
+
+host = database
+user = pakfire
+pass = pakfire
+db = pakfire
+
+[geoip-database]
+; Credentials to the geoip database.
+
+host = database
+user = pakfire
+pass = pakfire
+db = geoip
--- /dev/null
+#!/bin/bash
+#
+#settings
+#
+#="database"
+
+log() {
+ echo "#######################################"
+ echo ""
+ echo "$@"
+ echo ""
+ echo "#######################################"
+}
+
+# build the pbs from master branch
+log "Update all packages"
+yum update -y
+log "Installing epel"
+yum install -y epel-release
+log "Installing packages for build"
+yum install -y git gcc make intltool autoconf libtool libtool-devel libcap-devel libsolv-devel python-devel xz-devel
+log "Installing dependencies"
+yum install -y python-daemon python-tornado libcap libsolv xz
+
+# add a user
+groupadd -g 2000 pbs
+useradd --system --no-create-home --shell /bin/bash --uid 2000 --gid 2000 pbs
+
+mkdir -p /opt/dev
+log "Building pakfire"
+cd /opt/dev
+git clone -b master http://git.ipfire.org/pub/git/pakfire.git
+cd pakfire
+./autogen.sh
+./configure --prefix=/usr
+make
+make install
+
+log "Installing the pbs"
+cd /opt/
+git clone -b master http://git.ipfire.org/pub/git/pbs.git
+cd pbs
+chmod +x pakfire-web
+
+# cleanup
+yum remove -y git gcc make intltool autoconf libtool libtool-devel
+yum autoremove -y
+yum clean all
+rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /opt/dev/*
+
+# set permissions