2018-10-25 22:05:48 +02:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(realpath $(dirname "${0}"))
|
|
|
|
|
|
|
|
# Install Alpine SDK
|
|
|
|
apk update
|
|
|
|
apk add alpine-sdk
|
|
|
|
|
2018-10-25 22:17:39 +02:00
|
|
|
# Prepare build toolchain
|
2018-10-25 22:05:48 +02:00
|
|
|
adduser root abuild
|
|
|
|
cp etc/abuild.conf /etc/abuild.conf
|
|
|
|
cp usr/bin/abuild /usr/bin/abuild
|
|
|
|
cp usr/bin/fix-apk /usr/bin/fix-apk
|
|
|
|
cp usr/bin/lxc-build /usr/bin/lxc-build
|
2018-10-25 22:09:57 +02:00
|
|
|
cp usr/bin/lxc-pack /usr/bin/lxc-pack
|
2018-10-25 22:17:39 +02:00
|
|
|
mkdir -p /srv/build/lxc
|
2018-10-25 22:05:48 +02:00
|
|
|
# Supply /srv/build/repokey.rsa
|
2018-10-25 22:17:39 +02:00
|
|
|
# Supply /srv/build/packages.key
|
2018-10-25 22:05:48 +02:00
|
|
|
|
|
|
|
# Build native apps
|
|
|
|
cd ../app-acme-sh
|
|
|
|
abuild -F
|
|
|
|
cd ../app-lxc
|
|
|
|
su -c 'abuild -Fr'
|
|
|
|
|
|
|
|
# Build basic Alpine LXC image
|
|
|
|
mkdir -p /var/lib/lxc/shared/alpine
|
|
|
|
wget https://github.com/gliderlabs/docker-alpine/raw/c14b86580b9f86f42296050ec7564faf6b6db9be/versions/library-3.8/x86_64/rootfs.tar.xz -O - | tar xJf - -C /var/lib/lxc/shared/alpine
|
|
|
|
chmod 755 /var/lib/lxc/shared/alpine
|
|
|
|
lxc-build ../basic-alpine
|
|
|
|
|
|
|
|
# Build shared overlays
|
|
|
|
lxc-build ../basic-java
|
|
|
|
lxc-build ../basic-libxml
|
|
|
|
lxc-build ../basic-php
|
|
|
|
lxc-build ../basic-python2
|
|
|
|
lxc-build ../basic-python3
|
|
|
|
lxc-build ../basic-nodejs
|
|
|
|
lxc-build ../basic-ruby
|
|
|
|
lxc-build ../basic-tomcat
|
|
|
|
|
|
|
|
# Build applications
|
|
|
|
lxc-build ../activemq
|
|
|
|
lxc-build ../ckan
|
|
|
|
lxc-build ../ckan-datapusher
|
|
|
|
lxc-build ../crisiscleanup
|
|
|
|
lxc-build ../cts
|
|
|
|
lxc-build ../frontlinesms
|
|
|
|
lxc-build ../gnuhealth
|
|
|
|
lxc-build ../kanboard
|
|
|
|
lxc-build ../mariadb
|
|
|
|
lxc-build ../mifosx
|
|
|
|
lxc-build ../motech
|
|
|
|
lxc-build ../opendatakit
|
|
|
|
lxc-build ../opendatakit-build
|
|
|
|
lxc-build ../openmapkit
|
|
|
|
lxc-build ../pandora
|
|
|
|
lxc-build ../postgres
|
|
|
|
lxc-build ../rabbitmq
|
|
|
|
lxc-build ../redis
|
|
|
|
lxc-build ../sahana
|
|
|
|
lxc-build ../sahana-demo
|
|
|
|
lxc-build ../sambro
|
|
|
|
lxc-build ../seeddms
|
|
|
|
lxc-build ../sigmah
|
|
|
|
lxc-build ../solr
|
|
|
|
lxc-build ../ushahidi
|
|
|
|
|
|
|
|
# Create packages
|
|
|
|
lxc-pack ../basic-alpine
|
|
|
|
lxc-pack ../basic-java
|
|
|
|
lxc-pack ../basic-libxml
|
|
|
|
lxc-pack ../basic-php
|
|
|
|
lxc-pack ../basic-python2
|
|
|
|
lxc-pack ../basic-python3
|
|
|
|
lxc-pack ../basic-nodejs
|
|
|
|
lxc-pack ../basic-ruby
|
|
|
|
lxc-pack ../basic-tomcat
|
|
|
|
|
|
|
|
lxc-pack ../activemq
|
|
|
|
lxc-pack ../ckan
|
|
|
|
lxc-pack ../ckan-datapusher
|
|
|
|
lxc-pack ../crisiscleanup
|
|
|
|
lxc-pack ../cts
|
|
|
|
lxc-pack ../frontlinesms
|
|
|
|
lxc-pack ../gnuhealth
|
|
|
|
lxc-pack ../kanboard
|
|
|
|
lxc-pack ../mariadb
|
|
|
|
lxc-pack ../mifosx
|
|
|
|
lxc-pack ../motech
|
|
|
|
lxc-pack ../opendatakit
|
|
|
|
lxc-pack ../opendatakit-build
|
|
|
|
lxc-pack ../openmapkit
|
|
|
|
lxc-pack ../pandora
|
|
|
|
lxc-pack ../postgres
|
|
|
|
lxc-pack ../rabbitmq
|
|
|
|
lxc-pack ../redis
|
|
|
|
lxc-pack ../sahana
|
|
|
|
lxc-pack ../sahana-demo
|
|
|
|
lxc-pack ../sambro
|
|
|
|
lxc-pack ../seeddms
|
|
|
|
lxc-pack ../sigmah
|
|
|
|
lxc-pack ../solr
|
|
|
|
lxc-pack ../ushahidi
|