From afbd4a0f6000dbd691d8d80553d59c795614d56b Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 25 Jun 2019 15:56:35 +0200 Subject: [PATCH] New approach in package building and versioning --- build/usr/bin/fix-apk | 6 +- build/usr/bin/lxc-build | 207 +---------------- build/usr/bin/lxc-pack | 92 -------- build/usr/lib/python3.6/lxcbuild/__init__.py | 1 + .../usr/lib/python3.6/lxcbuild/lxcbuilder.py | 213 ++++++++++++++++++ build/usr/lib/python3.6/lxcbuild/lxcimage.py | 34 +++ build/usr/lib/python3.6/lxcbuild/lxcpacker.py | 89 ++++++++ lxc-apps/ckan-datapusher/lxcfile | 13 +- lxc-apps/ckan-datapusher/meta | 9 - lxc-apps/ckan/lxcfile | 14 +- lxc-apps/ckan/meta | 10 - lxc-apps/crisiscleanup/lxcfile | 16 +- lxc-apps/crisiscleanup/meta | 10 - lxc-apps/cts/lxcfile | 14 +- lxc-apps/cts/meta | 10 - lxc-apps/ecogis/lxcfile | 14 +- lxc-apps/ecogis/meta | 10 - lxc-apps/frontlinesms/lxcfile | 13 +- lxc-apps/frontlinesms/meta | 10 - lxc-apps/gnuhealth/lxcfile | 16 +- lxc-apps/gnuhealth/meta | 10 - lxc-apps/kanboard/lxcfile | 14 +- lxc-apps/kanboard/meta | 10 - lxc-apps/mifosx/lxcfile | 16 +- lxc-apps/mifosx/meta | 10 - lxc-apps/motech/lxcfile | 16 +- lxc-apps/motech/meta | 10 - lxc-apps/odoo/lxcfile | 16 +- lxc-apps/odoo/meta | 10 - lxc-apps/opendatakit-build/lxcfile | 16 +- lxc-apps/opendatakit-build/meta | 10 - lxc-apps/opendatakit/lxcfile | 16 +- lxc-apps/opendatakit/meta | 10 - lxc-apps/openmapkit/lxcfile | 17 +- lxc-apps/openmapkit/meta | 10 - lxc-apps/pandora/lxcfile | 14 +- lxc-apps/pandora/meta | 10 - lxc-apps/sahana-demo/lxcfile | 16 +- lxc-apps/sahana-demo/meta | 10 - lxc-apps/sahana-shared/lxcfile | 13 +- lxc-apps/sahana-shared/meta | 9 - lxc-apps/sahana/lxcfile | 16 +- lxc-apps/sahana/meta | 10 - lxc-apps/sambro/lxcfile | 16 +- lxc-apps/sambro/meta | 10 - lxc-apps/seeddms/lxcfile | 16 +- lxc-apps/seeddms/meta | 10 - lxc-apps/sigmah/lxcfile | 16 +- lxc-apps/sigmah/meta | 10 - lxc-apps/ushahidi/lxcfile | 14 +- lxc-apps/ushahidi/meta | 10 - lxc-services/activemq/lxcfile | 13 +- lxc-services/activemq/meta | 9 - lxc-services/mariadb/lxcfile | 11 +- lxc-services/mariadb/meta | 9 - lxc-services/postgres/lxcfile | 11 +- lxc-services/postgres/meta | 9 - lxc-services/rabbitmq/lxcfile | 11 +- lxc-services/rabbitmq/meta | 9 - lxc-services/redis/lxcfile | 11 +- lxc-services/redis/meta | 9 - lxc-services/solr/lxcfile | 13 +- lxc-services/solr/meta | 9 - lxc-shared/alpine3.8-nodejs8/lxcfile | 11 +- lxc-shared/alpine3.8-nodejs8/meta | 9 - lxc-shared/alpine3.8-php5.6/lxcfile | 11 +- lxc-shared/alpine3.8-php5.6/meta | 9 - lxc-shared/alpine3.8-ruby2.4/lxcfile | 11 +- lxc-shared/alpine3.8-ruby2.4/meta | 9 - lxc-shared/alpine3.8/lxcfile | 9 +- lxc-shared/alpine3.8/meta | 9 - lxc-shared/alpine3.9-java8/lxcfile | 11 +- lxc-shared/alpine3.9-java8/meta | 9 - lxc-shared/alpine3.9-nodejs10/lxcfile | 11 +- lxc-shared/alpine3.9-nodejs10/meta | 9 - lxc-shared/alpine3.9-php7.2/lxcfile | 11 +- lxc-shared/alpine3.9-php7.2/meta | 9 - lxc-shared/alpine3.9-python2.7/lxcfile | 11 +- lxc-shared/alpine3.9-python2.7/meta | 9 - lxc-shared/alpine3.9-python3.6/lxcfile | 11 +- lxc-shared/alpine3.9-python3.6/meta | 9 - lxc-shared/alpine3.9-ruby2.4/lxcfile | 11 +- lxc-shared/alpine3.9-ruby2.4/meta | 9 - lxc-shared/alpine3.9-tomcat7/lxcfile | 13 +- lxc-shared/alpine3.9-tomcat7/meta | 9 - lxc-shared/alpine3.9-tomcat8.5/lxcfile | 13 +- lxc-shared/alpine3.9-tomcat8.5/meta | 9 - lxc-shared/alpine3.9/lxcfile | 10 +- lxc-shared/alpine3.9/meta | 9 - 89 files changed, 729 insertions(+), 848 deletions(-) delete mode 100755 build/usr/bin/lxc-pack create mode 100644 build/usr/lib/python3.6/lxcbuild/__init__.py create mode 100644 build/usr/lib/python3.6/lxcbuild/lxcbuilder.py create mode 100644 build/usr/lib/python3.6/lxcbuild/lxcimage.py create mode 100644 build/usr/lib/python3.6/lxcbuild/lxcpacker.py delete mode 100644 lxc-apps/ckan-datapusher/meta delete mode 100644 lxc-apps/ckan/meta delete mode 100644 lxc-apps/crisiscleanup/meta delete mode 100644 lxc-apps/cts/meta delete mode 100644 lxc-apps/ecogis/meta delete mode 100644 lxc-apps/frontlinesms/meta delete mode 100644 lxc-apps/gnuhealth/meta delete mode 100644 lxc-apps/kanboard/meta delete mode 100644 lxc-apps/mifosx/meta delete mode 100644 lxc-apps/motech/meta delete mode 100644 lxc-apps/odoo/meta delete mode 100644 lxc-apps/opendatakit-build/meta delete mode 100644 lxc-apps/opendatakit/meta delete mode 100644 lxc-apps/openmapkit/meta delete mode 100644 lxc-apps/pandora/meta delete mode 100644 lxc-apps/sahana-demo/meta delete mode 100644 lxc-apps/sahana-shared/meta delete mode 100644 lxc-apps/sahana/meta delete mode 100644 lxc-apps/sambro/meta delete mode 100644 lxc-apps/seeddms/meta delete mode 100644 lxc-apps/sigmah/meta delete mode 100644 lxc-apps/ushahidi/meta delete mode 100644 lxc-services/activemq/meta delete mode 100644 lxc-services/mariadb/meta delete mode 100644 lxc-services/postgres/meta delete mode 100644 lxc-services/rabbitmq/meta delete mode 100644 lxc-services/redis/meta delete mode 100644 lxc-services/solr/meta delete mode 100644 lxc-shared/alpine3.8-nodejs8/meta delete mode 100644 lxc-shared/alpine3.8-php5.6/meta delete mode 100644 lxc-shared/alpine3.8-ruby2.4/meta delete mode 100644 lxc-shared/alpine3.8/meta delete mode 100644 lxc-shared/alpine3.9-java8/meta delete mode 100644 lxc-shared/alpine3.9-nodejs10/meta delete mode 100644 lxc-shared/alpine3.9-php7.2/meta delete mode 100644 lxc-shared/alpine3.9-python2.7/meta delete mode 100644 lxc-shared/alpine3.9-python3.6/meta delete mode 100644 lxc-shared/alpine3.9-ruby2.4/meta delete mode 100644 lxc-shared/alpine3.9-tomcat7/meta delete mode 100644 lxc-shared/alpine3.9-tomcat8.5/meta delete mode 100644 lxc-shared/alpine3.9/meta diff --git a/build/usr/bin/fix-apk b/build/usr/bin/fix-apk index 0de3c00..f241563 100755 --- a/build/usr/bin/fix-apk +++ b/build/usr/bin/fix-apk @@ -1,4 +1,5 @@ #!/usr/bin/python3 +# -*- coding: utf-8 -*- import os import sys @@ -39,5 +40,6 @@ def fix_world(layers): with open(os.path.join(layers[-1], 'etc/apk/world'), 'w') as f: f.writelines(world) -fix_installed(sys.argv[1:]) -fix_world(sys.argv[1:]) +if __name__ == '__main__': + fix_installed(sys.argv[1:]) + fix_world(sys.argv[1:]) diff --git a/build/usr/bin/lxc-build b/build/usr/bin/lxc-build index c7db300..406be81 100755 --- a/build/usr/bin/lxc-build +++ b/build/usr/bin/lxc-build @@ -1,210 +1,11 @@ #!/usr/bin/python3 +# -*- coding: utf-8 -*- -import os -import shutil -import subprocess -import sys - -LXC_ROOT = '/var/lib/lxc' -CONFIG_TEMPLATE = '''# Image name -lxc.uts.name = {name} - -# Network -lxc.net.0.type = veth -lxc.net.0.link = lxcbr0 -lxc.net.0.flags = up - -# Volumes -lxc.rootfs.path = {rootfs} - -# Mounts -lxc.mount.entry = shm dev/shm tmpfs rw,nodev,noexec,nosuid,relatime,mode=1777,create=dir 0 0 -lxc.mount.entry = /etc/hosts etc/hosts none bind,create=file 0 0 -lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,create=file 0 0 -{mounts} - -# Init -lxc.init.cmd = {cmd} -lxc.init.uid = {uid} -lxc.init.gid = {gid} -lxc.init.cwd = {cwd} - -# Environment -lxc.environment = PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -{env} - -# Halt -lxc.signal.halt = {halt} - -# Log -lxc.console.size = 1MB -lxc.console.logfile = /var/log/lxc/{name}.log - -# Other -lxc.arch = x86_64 -lxc.cap.drop = sys_admin -lxc.hook.pre-start = /usr/bin/vmmgr prepare-container -lxc.hook.start-host = /usr/bin/vmmgr register-container -lxc.hook.post-stop = /usr/bin/vmmgr unregister-container -lxc.include = /usr/share/lxc/config/common.conf -''' - -class LXCImage: - def __init__(self, build_path): - self.name = None - self.layers = [] - self.mounts = [] - self.env = [] - self.uid = 0 - self.gid = 0 - self.cmd = '/bin/true' - self.cwd = '/' - self.halt = 'SIGINT' - - if os.path.isfile(build_path): - self.lxcfile = os.path.realpath(build_path) - self.build_dir = os.path.dirname(self.lxcfile) - else: - self.build_dir = os.path.realpath(build_path) - self.lxcfile = os.path.join(self.build_dir, 'lxcfile') - - def build(self): - with open(self.lxcfile, 'r') as f: - lxcfile = [l.strip() for l in f.readlines()] - - script = [] - script_eof = None - - for line in lxcfile: - if script_eof: - if line == script_eof: - script_eof = None - self.run_script(script) - else: - script.append(line) - elif line.startswith('RUN'): - script = [] - script_eof = line.split()[1] - elif line.startswith('IMAGE'): - self.set_name(line.split()[1]) - elif line.startswith('LAYER'): - self.add_layer(line.split()[1]) - elif line.startswith('FIXLAYER'): - self.fix_layer(line.split()[1]) - elif line.startswith('COPY'): - srcdst = line.split() - self.copy_files(srcdst[1], srcdst[2] if len(srcdst) == 3 else '') - elif line.startswith('MOUNT'): - mount = line.split() - self.add_mount(mount[1], mount[2], mount[3]) - elif line.startswith('ENV'): - env = line.split() - self.add_env(env[1], env[2]) - elif line.startswith('USER'): - uidgid = line.split() - self.set_user(uidgid[1], uidgid[2]) - elif line.startswith('CMD'): - self.set_cmd(' '.join(line.split()[1:])) - elif line.startswith('WORKDIR'): - self.set_cwd(line.split()[1]) - elif line.startswith('HALT'): - self.set_halt(line.split()[1]) - # Add the final layer which will be treated as ephemeral - self.add_layer('{}/delta0'.format(self.name)) - - def rebuild_config(self): - if not self.name: - return - if len(self.layers) == 1: - rootfs = self.layers[0] - else: - # Multiple lower overlayfs layers are ordered from right to left (lower2:lower1:rootfs:upper) - rootfs = 'overlay:{}:{}'.format(':'.join(self.layers[:-1][::-1]), self.layers[-1]) - mounts = '\n'.join(self.mounts) - env = '\n'.join(self.env) - with open(os.path.join(LXC_ROOT, self.name, 'config'), 'w') as f: - f.write(CONFIG_TEMPLATE.format(name=self.name, - rootfs=rootfs, mounts=mounts, env=env, - uid=self.uid, gid=self.gid, - cmd=self.cmd, cwd=self.cwd, halt=self.halt)) - - def run_script(self, script): - sh = os.path.join(self.layers[-1], 'run.sh') - with open(sh, 'w') as f: - f.write('#!/bin/sh\nset -ev\n\n{}\n'.format('\n'.join(script))) - os.chmod(sh, 0o700) - subprocess.run(['lxc-execute', '-n', self.name, '--', '/bin/sh', '-lc', '/run.sh'], check=True) - os.unlink(sh) - - def set_name(self, name): - self.name = name - os.makedirs(os.path.join(LXC_ROOT, self.name), 0o755, True) - - def add_layer(self, layer): - layer = os.path.join(LXC_ROOT, layer) - self.layers.append(layer) - os.makedirs(layer, 0o755, True) - self.rebuild_config() - - def fix_layer(self, cmd): - subprocess.run([cmd]+self.layers, check=True) - - def copy_files(self, src, dst): - dst = os.path.join(self.layers[-1], dst) - if src.startswith('http://') or src.startswith('https://'): - self.unpack_http_archive(src, dst) - else: - src = os.path.join(self.build_dir, src) - copy_tree(src, dst) - - def unpack_http_archive(self, src, dst): - xf = 'xzf' - if src.endswith('.bz2'): - xf = 'xjf' - elif src.endswith('.xz'): - xf = 'xJf' - with subprocess.Popen(['wget', src, '-O', '-'], stdout=subprocess.PIPE) as wget: - with subprocess.Popen(['tar', xf, '-', '-C', dst], stdin=wget.stdout) as tar: - wget.stdout.close() - tar.wait() - - def add_mount(self, type, src, dst): - self.mounts.append('lxc.mount.entry = {} {} none bind,create={} 0 0'.format(src, dst, type.lower())) - self.rebuild_config() - - def add_env(self, key, value): - self.env.append('lxc.environment = {}={}'.format(key, value)) - self.rebuild_config() - - def set_user(self, uid, gid): - self.uid = uid - self.gid = gid - self.rebuild_config() - - def set_cmd(self, cmd): - self.cmd = cmd - self.rebuild_config() - - def set_cwd(self, cwd): - self.cwd = cwd - self.rebuild_config() - - def set_halt(self, halt): - self.halt = halt - self.rebuild_config() - -def copy_tree(src, dst): - if not os.path.isdir(src): - shutil.copy2(src, dst) - else: - os.makedirs(dst, exist_ok=True) - for name in os.listdir(src): - copy_tree(os.path.join(src, name), os.path.join(dst, name)) - shutil.copystat(src, dst) +from lxcbuild.lxcimage import LXCImage if __name__ == '__main__': if len(sys.argv) != 2 or sys.argv[1] in ('-h', '--help'): print('Usage: lxc-build \n where the buildpath can be either specific lxcfile or a directory containing one') else: - i = LXCImage(sys.argv[1]) - i.build() + image = LXCImage(sys.argv[1]) + image.build_and_pack() diff --git a/build/usr/bin/lxc-pack b/build/usr/bin/lxc-pack deleted file mode 100755 index 1b3f0a4..0000000 --- a/build/usr/bin/lxc-pack +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/python3 - -import hashlib -import json -import os -import subprocess -import sys - -from cryptography.hazmat.backends import default_backend -from cryptography.hazmat.primitives import hashes -from cryptography.hazmat.primitives.asymmetric import ec -from cryptography.hazmat.primitives.serialization import load_pem_private_key - -PKG_ROOT = '/srv/build/lxc' -PRIVATE_KEY = '/srv/build/packages.key' -LXC_ROOT = '/var/lib/lxc' - -def pack(path): - # Determine correct metadata file and package name - path = os.path.realpath(path) - if os.path.isdir(path): - meta_dir = path - meta_file = os.path.join(meta_dir, 'meta') - else: - meta_dir = os.path.dirname(path) - meta_file = path - pkg_name = os.path.basename(meta_dir) - - # Load metadata - with open(meta_file) as f: - meta = json.load(f) - - # Prepare package file names - os.makedirs(PKG_ROOT, 0o755, True) - tar_path = os.path.join(PKG_ROOT, '{}_{}-{}.tar'.format(pkg_name, meta['version'], meta['release'])) - xz_path = '{}.xz'.format(tar_path) - - # Remove old package - if os.path.exists(tar_path): - os.unlink(tar_path) - if os.path.exists(xz_path): - os.unlink(xz_path) - - # Create archive - print('Archiving', meta['lxcpath']) - subprocess.run(['tar', '--xattrs', '-cpf', tar_path, os.path.join(LXC_ROOT, meta['lxcpath'])], cwd='/') - # Add install/upgrade/uninstall scripts - scripts = ('install', 'install.sh', 'upgrade', 'upgrade.sh', 'uninstall', 'uninstall.sh') - scripts = [s for s in scripts if os.path.exists(os.path.join(meta_dir, s))] - subprocess.run(['tar', '--transform', 's|^|srv/{}/|'.format(pkg_name), '-rpf', tar_path] + scripts, cwd=meta_dir) - # Compress the tarball with xz (LZMA2) - print('Compressing', tar_path, '({:.2f} MB)'.format(os.path.getsize(tar_path)/1048576)) - subprocess.run(['xz', '-9', tar_path]) - print('Compressed ', xz_path, '({:.2f} MB)'.format(os.path.getsize(xz_path)/1048576)) - - # Register package - print('Registering package') - packages = {} - packages_file = os.path.join(PKG_ROOT, 'packages') - if os.path.exists(packages_file): - with open(packages_file, 'r') as f: - packages = json.load(f) - packages[pkg_name] = meta - packages[pkg_name]['size'] = os.path.getsize(xz_path) - packages[pkg_name]['sha512'] = hash_file(xz_path) - with open(packages_file, 'w') as f: - json.dump(packages, f, sort_keys=True, indent=4) - - # Sign packages file - print('Signing packages') - with open(PRIVATE_KEY, 'rb') as f: - priv_key = load_pem_private_key(f.read(), None, default_backend()) - with open(os.path.join(PKG_ROOT, 'packages'), 'rb') as f: - data = f.read() - with open(os.path.join(PKG_ROOT, 'packages.sig'), 'wb') as f: - f.write(priv_key.sign(data, ec.ECDSA(hashes.SHA512()))) - -def hash_file(file_path): - sha512 = hashlib.sha512() - with open(file_path, 'rb') as f: - while True: - data = f.read(65536) - if not data: - break - sha512.update(data) - return sha512.hexdigest() - -if __name__ == '__main__': - if len(sys.argv) != 2 or sys.argv[1] in ('-h', '--help'): - print('Usage: lxc-pack \n where the buildpath can be either specific meta file or a directory containing one') - else: - pack(sys.argv[1]) diff --git a/build/usr/lib/python3.6/lxcbuild/__init__.py b/build/usr/lib/python3.6/lxcbuild/__init__.py new file mode 100644 index 0000000..40a96af --- /dev/null +++ b/build/usr/lib/python3.6/lxcbuild/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/build/usr/lib/python3.6/lxcbuild/lxcbuilder.py b/build/usr/lib/python3.6/lxcbuild/lxcbuilder.py new file mode 100644 index 0000000..5a288e2 --- /dev/null +++ b/build/usr/lib/python3.6/lxcbuild/lxcbuilder.py @@ -0,0 +1,213 @@ +# -*- coding: utf-8 -*- + +import os +import shutil +import subprocess +import sys + +LXC_ROOT = '/var/lib/lxc' +CONFIG_TEMPLATE = '''# Image name +lxc.uts.name = {name} + +# Network +lxc.net.0.type = veth +lxc.net.0.link = lxcbr0 +lxc.net.0.flags = up + +# Volumes +lxc.rootfs.path = {rootfs} + +# Mounts +lxc.mount.entry = shm dev/shm tmpfs rw,nodev,noexec,nosuid,relatime,mode=1777,create=dir 0 0 +lxc.mount.entry = /etc/hosts etc/hosts none bind,create=file 0 0 +lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,create=file 0 0 +{mounts} + +# Init +lxc.init.uid = {uid} +lxc.init.gid = {gid} +lxc.init.cwd = {cwd} + +# Environment +lxc.environment = PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +{env} + +# Halt +lxc.signal.halt = {halt} + +# Log +lxc.console.size = 1MB +lxc.console.logfile = /var/log/lxc/{name}.log + +# Other +lxc.arch = x86_64 +lxc.cap.drop = sys_admin +lxc.hook.pre-start = /usr/bin/vmmgr prepare-container +lxc.hook.start-host = /usr/bin/vmmgr register-container +lxc.hook.post-stop = /usr/bin/vmmgr unregister-container +lxc.include = /usr/share/lxc/config/common.conf +''' + +class LXCBuilder: + def __init__(self, image): + self.image = image + self.script = [] + self.script_eof = None + self.already_built = False + + def build(self): + with open(self.image.lxcfile, 'r') as f: + for line in f: + line = line.strip() + if self.script_eof: + if line == self.script_eof: + self.script_eof = None + self.run_script(self.script) + else: + self.script.append(line) + elif line: + self.process_line(*line.split(None, 1)) + + def process_line(self, directive, args): + if 'RUN' == directive: + self.script = [] + self.script_eof = args + elif 'IMAGE' == directive: + self.set_name(*args.split()) + elif 'META' == directive: + self.add_meta(*args.split(None, 1)) + elif 'LAYER' == directive: + self.add_layer(*args.split()) + elif 'FIXLAYER' == directive: + self.fix_layer(args.split()) + elif 'COPY' == directive: + srcdst = args.split() + self.copy_files(srcdst[0], srcdst[1] if len(srcdst) == 2 else '') + elif 'MOUNT' == directive: + self.add_mount(args.split()) + elif 'ENV' == directive: + self.add_env(*args.split(None, 1)) + elif 'USER' == directive: + self.set_user(*args.split()) + elif 'CMD' == directive: + self.set_cmd(args) + elif 'WORKDIR' == directive: + self.set_cwd(args) + elif 'HALT' == directive: + self.set_halt(args) + + def get_layer_path(self, layer): + return os.path.join(LXC_ROOT, 'storage', layer) + + def rebuild_config(self): + if not self.image.upper_layer: + return + upper_layer = self.get_layer_path(self.image.upper_layer) + if not self.image.layers: + rootfs = upper_layer + else: + # Multiple lower overlayfs layers are ordered from right to left (lower2:lower1:rootfs:upper) + layers = [self.get_layer_path(layer) for layer in self.image.layers] + rootfs = 'overlay:{}:{}'.format(':'.join(layers[::-1]), upper_layer) + mounts = '\n'.join(['lxc.mount.entry = {} {} none bind,create={} 0 0'.format(m[1], m[2], m[0].lower()) for m in self.image.mounts]) + env = '\n'.join(['lxc.environment = {}={}'.format(e[0], e[1]) for e in self.image.env]) + cwd = self.image.cwd if self.image.cwd else '/' + halt = self.image.halt if self.image.halt else 'SIGINT' + with open(os.path.join(LXC_ROOT, self.image.upper_layer, 'config'), 'w') as f: + f.write(CONFIG_TEMPLATE.format(name=self.image.upper_layer, rootfs=rootfs, mounts=mounts, env=env, uid=self.image.uid, gid=self.image.gid, cwd=cwd, halt=halt)) + + def run_script(self, script): + if self.already_built: + return + sh = os.path.join(self.get_layer_path(self.image.upper_layer), 'run.sh') + with open(sh, 'w') as f: + f.write('#!/bin/sh\nset -ev\n\n{}\n'.format('\n'.join(script))) + os.chmod(sh, 0o700) + subprocess.run(['lxc-execute', '-n', self.image.upper_layer, '--', '/bin/sh', '-lc', '/run.sh'], check=True) + os.unlink(sh) + + def set_name(self, name, version): + self.image.name = name + self.image.version = version + self.image.upper_layer = '{}_{}'.format(self.image.name, self.image.version) + layer_path = self.get_layer_path(self.image.upper_layer) + if os.path.exists(layer_path): + self.already_built = True + print('Layer {} already exists, skipping build tasks'.format(self.image.upper_layer)) + else: + os.makedirs(layer_path, 0o755, True) + os.makedirs(os.path.join(LXC_ROOT, self.image.upper_layer), 0o755, True) + self.rebuild_config() + + def add_meta(self, key, value): + self.image.meta[key] = value + + def add_layer(self, name, version): + self.image.layers.append('{}_{}'.format(name, version)) + self.rebuild_config() + + def fix_layer(self, cmd): + if self.already_built: + return + layers = [self.get_layer_path(layer) for layer in self.image.layers] + layers.append(self.get_layer_path(self.image.upper_layer)) + subprocess.run([cmd]+layers, check=True) + + def copy_files(self, src, dst): + if self.already_built: + return + dst = os.path.join(self.get_layer_path(self.image.upper_layer), dst) + if src.startswith('http://') or src.startswith('https://'): + unpack_http_archive(src, dst) + else: + src = os.path.join(self.image.build_dir, src) + copy_tree(src, dst) + + def add_mount(self, args): + self.image.mounts.append(args) + if not self.already_built: + self.rebuild_config() + + def add_env(self, args): + self.image.env.append(args) + if not self.already_built: + self.rebuild_config() + + def set_user(self, uid, gid): + self.image.uid = uid + self.image.gid = gid + if not self.already_built: + self.rebuild_config() + + def set_cmd(self, cmd): + self.image.cmd = cmd + + def set_cwd(self, cwd): + self.image.cwd = cwd + if not self.already_built: + self.rebuild_config() + + def set_halt(self, halt): + self.image.halt = halt + if not self.already_built: + self.rebuild_config() + +def unpack_http_archive(src, dst): + xf = 'xzf' + if src.endswith('.bz2'): + xf = 'xjf' + elif src.endswith('.xz'): + xf = 'xJf' + with subprocess.Popen(['wget', src, '-O', '-'], stdout=subprocess.PIPE) as wget: + with subprocess.Popen(['tar', xf, '-', '-C', dst], stdin=wget.stdout) as tar: + wget.stdout.close() + tar.wait() + +def copy_tree(src, dst): + if not os.path.isdir(src): + shutil.copy2(src, dst) + else: + os.makedirs(dst, exist_ok=True) + for name in os.listdir(src): + copy_tree(os.path.join(src, name), os.path.join(dst, name)) + shutil.copystat(src, dst) diff --git a/build/usr/lib/python3.6/lxcbuild/lxcimage.py b/build/usr/lib/python3.6/lxcbuild/lxcimage.py new file mode 100644 index 0000000..4fbee93 --- /dev/null +++ b/build/usr/lib/python3.6/lxcbuild/lxcimage.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +import os + +from .lxcbuilder import LXCBuilder +from .lxcpacker import LXCPacker + +class LXCImage: + def __init__(self, build_path): + self.name = None + self.version = None + self.meta = {} + self.layers = [] + self.upper_layer = None + self.mounts = [] + self.env = [] + self.uid = 0 + self.gid = 0 + self.cmd = None + self.cwd = None + self.halt = None + + if os.path.isfile(build_path): + self.lxcfile = os.path.realpath(build_path) + self.build_dir = os.path.dirname(self.lxcfile) + else: + self.build_dir = os.path.realpath(build_path) + self.lxcfile = os.path.join(self.build_dir, 'lxcfile') + + def build_and_pack(self): + builder = LXCBuilder(self) + builder.build() + packer = LXCPacker(self) + packer.pack() diff --git a/build/usr/lib/python3.6/lxcbuild/lxcpacker.py b/build/usr/lib/python3.6/lxcbuild/lxcpacker.py new file mode 100644 index 0000000..d3770de --- /dev/null +++ b/build/usr/lib/python3.6/lxcbuild/lxcpacker.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- + +import hashlib +import json +import os +import subprocess +import sys + +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.hazmat.primitives.serialization import load_pem_private_key + +PKG_ROOT = '/srv/build/lxc' +PRIVATE_KEY = '/srv/build/packages.key' +LXC_STORAGE = '/var/lib/lxc/storage' + +class LXCPacker: + def __init__(self, image): + self.image = image + self.tar_path = None + self.xz_path = None + + def pack(self): + # Prepare package file names + self.tar_path = os.path.join(PKG_ROOT, '{}.tar'.format(self.image.upper_layer)) + self.xz_path = '{}.xz'.format(self.tar_path) + if os.path.exists(self.xz_path): + print('Package {} already exists, skipping packaging tasks'.format(self.xz_path)) + return + os.makedirs(PKG_ROOT, 0o755, True) + self.create_archive() + self.register_package() + self.sign_packages() + + def create_archive(self): + # Create archive + print('Archiving', self.image.upper_layer) + subprocess.run(['tar', '--xattrs', '-cpf', self.tar_path, os.path.join(LXC_STORAGE, self.image.upper_layer)], cwd='/') + # Add install/upgrade/uninstall scripts + scripts = ('install', 'install.sh', 'upgrade', 'upgrade.sh', 'uninstall', 'uninstall.sh') + scripts = [s for s in scripts if os.path.exists(os.path.join(self.image.build_dir, s))] + subprocess.run(['tar', '--transform', 's|^|srv/{}/|'.format(self.image.upper_layer), '-rpf', self.tar_path] + scripts, cwd=self.image.build_dir) + # Compress the tarball with xz (LZMA2) + print('Compressing', self.tar_path, '({:.2f} MB)'.format(os.path.getsize(self.tar_path)/1048576)) + subprocess.run(['xz', '-9', self.tar_path]) + print('Compressed ', self.xz_path, '({:.2f} MB)'.format(os.path.getsize(self.xz_path)/1048576)) + + def register_package(self): + # Prepare metadata + meta = self.image.meta.copy() + meta['lxc'] = {} + for key in ('layers', 'mounts', 'env', 'cmd', 'cwd', 'uid', 'gid', 'halt'): + value = getattr(self.image, key) + if value: + meta['lxc'][key] = value + + # Register package + print('Registering package') + packages = {} + packages_file = os.path.join(PKG_ROOT, 'packages') + if os.path.exists(packages_file): + with open(packages_file, 'r') as f: + packages = json.load(f) + packages[self.image.name] = meta + packages[self.image.name]['size'] = os.path.getsize(self.xz_path) + packages[self.image.name]['sha512'] = hash_file(self.xz_path) + with open(packages_file, 'w') as f: + json.dump(packages, f, sort_keys=True, indent=4) + + def sign_packages(self): + # Sign packages file + print('Signing packages') + with open(PRIVATE_KEY, 'rb') as f: + priv_key = load_pem_private_key(f.read(), None, default_backend()) + with open(os.path.join(PKG_ROOT, 'packages'), 'rb') as f: + data = f.read() + with open(os.path.join(PKG_ROOT, 'packages.sig'), 'wb') as f: + f.write(priv_key.sign(data, ec.ECDSA(hashes.SHA512()))) + +def hash_file(file_path): + sha512 = hashlib.sha512() + with open(file_path, 'rb') as f: + while True: + data = f.read(65536) + if not data: + break + sha512.update(data) + return sha512.hexdigest() diff --git a/lxc-apps/ckan-datapusher/lxcfile b/lxc-apps/ckan-datapusher/lxcfile index fca383a..283da90 100644 --- a/lxc-apps/ckan-datapusher/lxcfile +++ b/lxc-apps/ckan-datapusher/lxcfile @@ -1,7 +1,12 @@ -IMAGE ckan-datapusher -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER ckan-datapusher/ckan-datapusher +IMAGE ckan-datapusher 0.0.13-190620 +META title CKAN DataPusher +META desc-cs Služba datového skladu pro extrakci dat +META desc-en Data store data extraction service +META type app +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/ckan-datapusher/meta b/lxc-apps/ckan-datapusher/meta deleted file mode 100644 index dfe0675..0000000 --- a/lxc-apps/ckan-datapusher/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Služba datového skladu pro extrakci dat", - "desc-en": "Data store data extraction service", - "lxcpath": "ckan-datapusher", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python2.7"] -} diff --git a/lxc-apps/ckan/lxcfile b/lxc-apps/ckan/lxcfile index 95175bb..5b863c3 100644 --- a/lxc-apps/ckan/lxcfile +++ b/lxc-apps/ckan/lxcfile @@ -1,7 +1,13 @@ -IMAGE ckan -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER ckan/ckan +IMAGE ckan 2.8.2-190620 +META title CKAN +META desc-cs Datový sklad +META desc-en Data store +META type app +META license GPL +META depends ckan-datapusher postgres redis solr + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/ckan/meta b/lxc-apps/ckan/meta deleted file mode 100644 index da7c74b..0000000 --- a/lxc-apps/ckan/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "CKAN", - "desc-cs": "Datový sklad", - "desc-en": "Data store", - "lxcpath": "ckan", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python2.7", "ckan-datapusher", "postgres", "redis", "solr"] -} diff --git a/lxc-apps/crisiscleanup/lxcfile b/lxc-apps/crisiscleanup/lxcfile index 93a6c3c..6a1baa2 100644 --- a/lxc-apps/crisiscleanup/lxcfile +++ b/lxc-apps/crisiscleanup/lxcfile @@ -1,8 +1,14 @@ -IMAGE crisiscleanup -LAYER shared/alpine3.8 -LAYER shared/alpine3.8-ruby2.4 -LAYER shared/alpine3.8-nodejs8 -LAYER crisiscleanup/crisiscleanup +IMAGE crisiscleanup 2.2.0-190620 +META title Crisis Cleanup +META desc-cs Mapování následků katastrof +META desc-en Disaster relief mapping +META type app +META license GPL +META depends postgres + +LAYER alpine3.8 3.8.4-190620 +LAYER alpine3.8-ruby2.4 2.4.5-190620 +LAYER alpine3.8-nodejs8 8.14.0-190620 FIXLAYER /usr/bin/fix-apk diff --git a/lxc-apps/crisiscleanup/meta b/lxc-apps/crisiscleanup/meta deleted file mode 100644 index 0dd212b..0000000 --- a/lxc-apps/crisiscleanup/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Crisis Cleanup", - "desc-cs": "Mapování následků katastrof", - "desc-en": "Disaster relief mapping", - "lxcpath": "crisiscleanup", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.8-ruby2.4", "alpine3.8-nodejs8", "postgres"] -} diff --git a/lxc-apps/cts/lxcfile b/lxc-apps/cts/lxcfile index d746230..570ad56 100644 --- a/lxc-apps/cts/lxcfile +++ b/lxc-apps/cts/lxcfile @@ -1,7 +1,13 @@ -IMAGE cts -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER cts/cts +IMAGE cts 0.8.0-190620 +META title CTS +META desc-cs Sledovací systém komodit +META desc-en Commodity tracking system +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/cts/meta b/lxc-apps/cts/meta deleted file mode 100644 index df1550e..0000000 --- a/lxc-apps/cts/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "CTS", - "desc-cs": "Sledovací systém komodit", - "desc-en": "Commodity tracking system", - "lxcpath": "cts", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python2.7", "postgres"] -} diff --git a/lxc-apps/ecogis/lxcfile b/lxc-apps/ecogis/lxcfile index a4fb77e..cf006a9 100644 --- a/lxc-apps/ecogis/lxcfile +++ b/lxc-apps/ecogis/lxcfile @@ -1,7 +1,13 @@ -IMAGE ecogis -LAYER shared/alpine3.8 -LAYER shared/alpine3.8-php5.6 -LAYER ecogis/ecogis +IMAGE ecogis 0.0.1-190620 +META title EcoGIS +META desc-cs EcoGIS +META desc-en EcoGIS +META type app +META license GPL +META depends postgres + +LAYER alpine3.8 3.8.4-190620 +LAYER alpine3.8-php5.6 5.6.40-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/ecogis/meta b/lxc-apps/ecogis/meta deleted file mode 100644 index b20489c..0000000 --- a/lxc-apps/ecogis/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "EcoGIS", - "desc-cs": "EcoGIS", - "desc-en": "EcoGIS", - "lxcpath": "ecogis", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.8-php5.6", "postgres"] -} diff --git a/lxc-apps/frontlinesms/lxcfile b/lxc-apps/frontlinesms/lxcfile index 21fb94e..dd92bef 100644 --- a/lxc-apps/frontlinesms/lxcfile +++ b/lxc-apps/frontlinesms/lxcfile @@ -1,7 +1,12 @@ -IMAGE frontlinesms -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER frontlinesms/frontlinesms +IMAGE frontlinesms 2.6.5-190620 +META title FrontlineSMS +META desc-cs Hromadné odesílání zpráv +META desc-en Bulk SMS messaging +META type app +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/frontlinesms/meta b/lxc-apps/frontlinesms/meta deleted file mode 100644 index 0d264a1..0000000 --- a/lxc-apps/frontlinesms/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "FrontlineSMS", - "desc-cs": "Hromadné odesílání zpráv", - "desc-en": "Bulk SMS messaging", - "lxcpath": "frontlinesms", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-java8"] -} diff --git a/lxc-apps/gnuhealth/lxcfile b/lxc-apps/gnuhealth/lxcfile index 487fc20..376f3f9 100644 --- a/lxc-apps/gnuhealth/lxcfile +++ b/lxc-apps/gnuhealth/lxcfile @@ -1,8 +1,14 @@ -IMAGE gnuhealth -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python3.6 -LAYER shared/alpine3.9-nodejs10 -LAYER gnuhealth/gnuhealth +IMAGE gnuhealth 3.4.1-190620 +META title GNU Health +META desc-cs Administrace lékařských záznamů +META desc-en Medical records administration +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python3.6 3.6.8-190620 +LAYER alpine3.9-nodejs10 10.14.2-190620 FIXLAYER /usr/bin/fix-apk diff --git a/lxc-apps/gnuhealth/meta b/lxc-apps/gnuhealth/meta deleted file mode 100644 index 21491ba..0000000 --- a/lxc-apps/gnuhealth/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "GNU Health", - "desc-cs": "Lékařské záznamy pacientů", - "desc-en": "Lékařské záznamy pacientů", - "lxcpath": "gnuhealth", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python3.6", "alpine3.9-nodejs10", "postgres"] -} diff --git a/lxc-apps/kanboard/lxcfile b/lxc-apps/kanboard/lxcfile index 7a76099..f96a380 100644 --- a/lxc-apps/kanboard/lxcfile +++ b/lxc-apps/kanboard/lxcfile @@ -1,7 +1,13 @@ -IMAGE kanboard -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-php7.2 -LAYER kanboard/kanboard +IMAGE kanboard 1.2.9-190620 +META title KanBoard +META desc-cs Kanban řízení projektů +META desc-en Kanban project management +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-php7.2 7.2.19-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/kanboard/meta b/lxc-apps/kanboard/meta deleted file mode 100644 index 08ce849..0000000 --- a/lxc-apps/kanboard/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "KanBoard", - "desc-cs": "Kanban řízení projektů", - "desc-en": "Kanban řízení projektů", - "lxcpath": "kanboard", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-php7.2", "postgres"] -} diff --git a/lxc-apps/mifosx/lxcfile b/lxc-apps/mifosx/lxcfile index 94542e7..5b3e6ee 100644 --- a/lxc-apps/mifosx/lxcfile +++ b/lxc-apps/mifosx/lxcfile @@ -1,8 +1,14 @@ -IMAGE mifosx -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-tomcat8.5 -LAYER mifosx/mifosx +IMAGE mifosx 18.03.01-190620 +META title Mifos X +META desc-cs Mikrofinancování rozvojových projektů +META desc-en Development projects microfinancing +META type app +META license GPL +META depends mariadb + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 +LAYER alpine3.9-tomcat8.5 8.5.41-190620 RUN EOF # Install full-featured wget to work around sourceforge bugs diff --git a/lxc-apps/mifosx/meta b/lxc-apps/mifosx/meta deleted file mode 100644 index 897b25b..0000000 --- a/lxc-apps/mifosx/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Mifos X", - "desc-cs": "Mikrofinancování rozvojových projektů", - "desc-en": "Mikrofinancování rozvojových projektů", - "lxcpath": "mifosx", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-tomcat8.5", "mariadb"] -} diff --git a/lxc-apps/motech/lxcfile b/lxc-apps/motech/lxcfile index 1895097..bef95c7 100644 --- a/lxc-apps/motech/lxcfile +++ b/lxc-apps/motech/lxcfile @@ -1,8 +1,14 @@ -IMAGE motech -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-tomcat7 -LAYER motech/motech +IMAGE motech 1.3.0-190620 +META title Motech +META desc-cs Automatizace komunikace +META desc-en Communication automation +META type app +META license GPL +META depends activemq postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 +LAYER alpine3.9-tomcat7 7.0.94-190620 RUN EOF # Download Motech diff --git a/lxc-apps/motech/meta b/lxc-apps/motech/meta deleted file mode 100644 index 428e124..0000000 --- a/lxc-apps/motech/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Motech", - "desc-cs": "Automatizace komunikace", - "desc-en": "Automatizace komunikace", - "lxcpath": "motech", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-tomcat7", "activemq", "postgres"] -} diff --git a/lxc-apps/odoo/lxcfile b/lxc-apps/odoo/lxcfile index 04476fe..f56b525 100644 --- a/lxc-apps/odoo/lxcfile +++ b/lxc-apps/odoo/lxcfile @@ -1,8 +1,14 @@ -IMAGE odoo -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python3.6 -LAYER shared/alpine3.9-nodejs10 -LAYER odoo/odoo +IMAGE odoo 12.0.0-190620 +META title Odoo +META desc-cs Sada aplikací pro správu organizace +META desc-en Company management application suite +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python3.6 3.6.8-190620 +LAYER alpine3.9-nodejs10 10.14.2-190620 FIXLAYER /usr/bin/fix-apk diff --git a/lxc-apps/odoo/meta b/lxc-apps/odoo/meta deleted file mode 100644 index 8d8e092..0000000 --- a/lxc-apps/odoo/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Odoo", - "desc-cs": "Sada aplikací pro správu organizace", - "desc-en": "Sada aplikací pro správu organizace", - "lxcpath": "odoo", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python3.6", "alpine3.9-nodejs10", "postgres"] -} diff --git a/lxc-apps/opendatakit-build/lxcfile b/lxc-apps/opendatakit-build/lxcfile index 42cf5b4..8669e57 100644 --- a/lxc-apps/opendatakit-build/lxcfile +++ b/lxc-apps/opendatakit-build/lxcfile @@ -1,8 +1,14 @@ -IMAGE opendatakit-build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-ruby2.4 -LAYER shared/alpine3.9-nodejs10 -LAYER opendatakit-build/opendatakit-build +IMAGE opendatakit-build 0.3.5-190620 +META title OpenDataKit Build +META desc-cs Sběr formulářových dat - návrh formulářů +META desc-en Form data collection - Form designer +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-ruby2.4 2.4.5-190620 +LAYER alpine3.9-nodejs10 10.14.2-190620 FIXLAYER /usr/bin/fix-apk diff --git a/lxc-apps/opendatakit-build/meta b/lxc-apps/opendatakit-build/meta deleted file mode 100644 index f6dda74..0000000 --- a/lxc-apps/opendatakit-build/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "OpenDataKit Build", - "desc-cs": "Sběr formulářových dat - Aplikace pro návrh formulářů", - "desc-en": "Sběr formulářových dat - Aplikace pro návrh formulářů", - "lxcpath": "opendatakit-build", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-ruby2.4", "alpine3.9-nodejs10", "postgres"] -} diff --git a/lxc-apps/opendatakit/lxcfile b/lxc-apps/opendatakit/lxcfile index f2b5902..43b2a25 100644 --- a/lxc-apps/opendatakit/lxcfile +++ b/lxc-apps/opendatakit/lxcfile @@ -1,8 +1,14 @@ -IMAGE opendatakit -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-tomcat8.5 -LAYER opendatakit/opendatakit +IMAGE opendatakit 2.0.3-190620 +META title OpenDataKit +META desc-cs Sběr formulářových dat +META desc-en Form data collection +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 +LAYER alpine3.9-tomcat8.5 8.5.41-190620 RUN EOF # Download OpenDataKit diff --git a/lxc-apps/opendatakit/meta b/lxc-apps/opendatakit/meta deleted file mode 100644 index aeb50a3..0000000 --- a/lxc-apps/opendatakit/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "OpenDataKit", - "desc-cs": "Sběr formulářových dat", - "desc-en": "Sběr formulářových dat", - "lxcpath": "opendatakit", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-tomcat8.5", "postgres"] -} diff --git a/lxc-apps/openmapkit/lxcfile b/lxc-apps/openmapkit/lxcfile index 6e3e281..8430097 100644 --- a/lxc-apps/openmapkit/lxcfile +++ b/lxc-apps/openmapkit/lxcfile @@ -1,9 +1,14 @@ -IMAGE openmapkit -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-python2.7 -LAYER shared/alpine3.9-nodejs10 -LAYER openmapkit/openmapkit +IMAGE openmapkit 0.12.0-190620 +META title OpenMapKit +META desc-cs Sběr mapových dat +META desc-en Map data collection +META type app +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 +LAYER alpine3.9-nodejs10 10.14.2-190620 FIXLAYER /usr/bin/fix-apk diff --git a/lxc-apps/openmapkit/meta b/lxc-apps/openmapkit/meta deleted file mode 100644 index 078c327..0000000 --- a/lxc-apps/openmapkit/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "OpenMapKit", - "desc-cs": "Sběr mapových dat", - "desc-en": "Sběr mapových dat", - "lxcpath": "openmapkit", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-java8", "alpine3.9-python2.7", "alpine3.9-nodejs10", "postgres"] -} diff --git a/lxc-apps/pandora/lxcfile b/lxc-apps/pandora/lxcfile index 0b136ed..ce2b350 100644 --- a/lxc-apps/pandora/lxcfile +++ b/lxc-apps/pandora/lxcfile @@ -1,7 +1,13 @@ -IMAGE pandora -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python3.6 -LAYER pandora/pandora +IMAGE pandora 0.0.1-190620 +META title Pan.do/ra +META desc-cs Archiv medií +META desc-en Media archive +META type app +META license GPL +META depends postgres rabbitmq + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python3.6 3.6.8-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/pandora/meta b/lxc-apps/pandora/meta deleted file mode 100644 index 662509c..0000000 --- a/lxc-apps/pandora/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Pan.do/ra", - "desc-cs": "Archiv medií", - "desc-en": "Media archive", - "lxcpath": "pandora", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python3.6", "postgres", "rabbitmq"] -} diff --git a/lxc-apps/sahana-demo/lxcfile b/lxc-apps/sahana-demo/lxcfile index d2e4256..d0852a7 100644 --- a/lxc-apps/sahana-demo/lxcfile +++ b/lxc-apps/sahana-demo/lxcfile @@ -1,8 +1,14 @@ -IMAGE sahana-demo -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER shared/sahana -LAYER sahana-demo/sahana-demo +IMAGE sahana-demo 0.0.1-190620 +META title Sahana Eden - Demo +META desc-cs Řízení humanítární činnosti - Demo instance +META desc-en Management of humanitarian activities - Demo instance +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 +LAYER sahana-shared 0.0.1-190620 MOUNT DIR /srv/sahana-demo/conf srv/web2py/applications/eden/models MOUNT DIR /srv/sahana-demo/data/default srv/web2py/applications/eden/modules/templates/default diff --git a/lxc-apps/sahana-demo/meta b/lxc-apps/sahana-demo/meta deleted file mode 100644 index f460565..0000000 --- a/lxc-apps/sahana-demo/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Sahana Eden - Demo", - "desc-cs": "Řízení humanítární činnosti - Ukázková instance", - "desc-en": "Řízení humanítární činnosti - Ukázková instance", - "lxcpath": "sahana-demo", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["sahana-shared", "postgres"] -} diff --git a/lxc-apps/sahana-shared/lxcfile b/lxc-apps/sahana-shared/lxcfile index 5597048..81d1850 100644 --- a/lxc-apps/sahana-shared/lxcfile +++ b/lxc-apps/sahana-shared/lxcfile @@ -1,7 +1,12 @@ -IMAGE sahana -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER shared/sahana +IMAGE sahana-shared 0.0.1-190620 +META title Sahana Eden - Shared layer +META desc-cs Řízení humanítární činnosti - sdílená vrstva +META desc-en Management of humanitarian activities - shared layer +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/sahana-shared/meta b/lxc-apps/sahana-shared/meta deleted file mode 100644 index 54c7f97..0000000 --- a/lxc-apps/sahana-shared/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Řízení humanítární činnosti - Sdílená vrstva", - "desc-en": "Řízení humanítární činnosti - Sdílená vrstva", - "lxcpath": "shared/sahana", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-python2.7"] -} diff --git a/lxc-apps/sahana/lxcfile b/lxc-apps/sahana/lxcfile index ec9def2..2a3d1f2 100644 --- a/lxc-apps/sahana/lxcfile +++ b/lxc-apps/sahana/lxcfile @@ -1,8 +1,14 @@ -IMAGE sahana -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER shared/sahana -LAYER sahana/sahana +IMAGE sahana 0.0.1-190620 +META title Sahana Eden +META desc-cs Řízení humanítární činnosti +META desc-en Management of humanitarian activities +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 +LAYER sahana-shared 0.0.1-190620 MOUNT DIR /srv/sahana/conf srv/web2py/applications/eden/models MOUNT DIR /srv/sahana/data/Spotter srv/web2py/applications/eden/modules/templates/Spotter diff --git a/lxc-apps/sahana/meta b/lxc-apps/sahana/meta deleted file mode 100644 index 7157c0f..0000000 --- a/lxc-apps/sahana/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Sahana Eden", - "desc-cs": "Řízení humanítární činnosti", - "desc-en": "Řízení humanítární činnosti", - "lxcpath": "sahana", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["sahana-shared", "postgres"] -} diff --git a/lxc-apps/sambro/lxcfile b/lxc-apps/sambro/lxcfile index 0698ef2..8e53894 100644 --- a/lxc-apps/sambro/lxcfile +++ b/lxc-apps/sambro/lxcfile @@ -1,8 +1,14 @@ -IMAGE sambro -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 -LAYER shared/sahana -LAYER sambro/sambro +IMAGE sambro 0.0.1-190620 +META title Sahana Eden - SAMBRO +META desc-cs Řízení humanítární činnosti - Centrum hlášení a výstrah +META desc-en Management of humanitarian activities - Reporting and alerting center +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-python2.7 2.7.16-190620 +LAYER sahana-shared 0.0.1-190620 MOUNT DIR /srv/sambro/conf srv/web2py/applications/eden/models MOUNT DIR /srv/sambro/data/SAMBRO srv/web2py/applications/eden/modules/templates/SAMBRO diff --git a/lxc-apps/sambro/meta b/lxc-apps/sambro/meta deleted file mode 100644 index 6871f47..0000000 --- a/lxc-apps/sambro/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Sahana Eden - SAMBRO", - "desc-cs": "Centrum hlášení a výstrah", - "desc-en": "Centrum hlášení a výstrah", - "lxcpath": "sambro", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["sahana-shared", "postgres"] -} diff --git a/lxc-apps/seeddms/lxcfile b/lxc-apps/seeddms/lxcfile index 1ffb41e..4b6eee9 100644 --- a/lxc-apps/seeddms/lxcfile +++ b/lxc-apps/seeddms/lxcfile @@ -1,8 +1,14 @@ -IMAGE seeddms -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-php7.2 -LAYER shared/alpine3.9-python3.6 -LAYER seeddms/seeddms +IMAGE seeddms 5.1.9-190620 +META title SeedDMS +META desc-cs Archiv dokumentace +META desc-en Document management system +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-php7.2 7.2.19-190620 +LAYER alpine3.9-python3.6 3.6.8-190620 FIXLAYER /usr/bin/fix-apk diff --git a/lxc-apps/seeddms/meta b/lxc-apps/seeddms/meta deleted file mode 100644 index 7df33c5..0000000 --- a/lxc-apps/seeddms/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "SeedDMS", - "desc-cs": "Archiv dokumentace", - "desc-en": "Archiv dokumentace", - "lxcpath": "seeddms", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-php7.2", "alpine3.9-python3.6", "postgres"] -} diff --git a/lxc-apps/sigmah/lxcfile b/lxc-apps/sigmah/lxcfile index a55c824..14f48c3 100644 --- a/lxc-apps/sigmah/lxcfile +++ b/lxc-apps/sigmah/lxcfile @@ -1,8 +1,14 @@ -IMAGE sigmah -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-tomcat8.5 -LAYER sigmah/sigmah +IMAGE sigmah 2.0.2-190620 +META title Sigmah +META desc-cs Finanční řízení sbírek +META desc-en Donation management +META type app +META license GPL +META depends postgres + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 +LAYER alpine3.9-tomcat8.5 8.5.41-190620 RUN EOF # Download Sigmah diff --git a/lxc-apps/sigmah/meta b/lxc-apps/sigmah/meta deleted file mode 100644 index 3ead125..0000000 --- a/lxc-apps/sigmah/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Sigmah", - "desc-cs": "Finanční řízení sbírek", - "desc-en": "Finanční řízení sbírek", - "lxcpath": "sigmah", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-tomcat8.5", "postgres"] -} diff --git a/lxc-apps/ushahidi/lxcfile b/lxc-apps/ushahidi/lxcfile index 93a399c..d40b896 100644 --- a/lxc-apps/ushahidi/lxcfile +++ b/lxc-apps/ushahidi/lxcfile @@ -1,7 +1,13 @@ -IMAGE ushahidi -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-php7.2 -LAYER ushahidi/ushahidi +IMAGE ushahidi 3.12.3-190620 +META title Sigmah +META desc-cs Skupinová reakce na události +META desc-en Group reaction to events +META type app +META license GPL +META depends mariadb + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-php7.2 7.2.19-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/ushahidi/meta b/lxc-apps/ushahidi/meta deleted file mode 100644 index ac1fb06..0000000 --- a/lxc-apps/ushahidi/meta +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Ushahidi", - "desc-cs": "Skupinová reakce na události", - "desc-en": "Skupinová reakce na události", - "lxcpath": "ushahidi", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-php7.2", "mariadb"] -} diff --git a/lxc-services/activemq/lxcfile b/lxc-services/activemq/lxcfile index 183caf2..3e9ce0b 100644 --- a/lxc-services/activemq/lxcfile +++ b/lxc-services/activemq/lxcfile @@ -1,7 +1,12 @@ -IMAGE activemq -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER activemq/activemq +IMAGE activemq 5.15.9-190620 +META title ActiveMQ +META desc-cs ActveMQ message broker +META desc-en ActveMQ message broker +META type service +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 RUN EOF # Download and install ActiveMQ diff --git a/lxc-services/activemq/meta b/lxc-services/activemq/meta deleted file mode 100644 index 80dd28c..0000000 --- a/lxc-services/activemq/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "ActiveMQ", - "desc-en": "ActiveMQ", - "lxcpath": "activemq", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-java8"] -} diff --git a/lxc-services/mariadb/lxcfile b/lxc-services/mariadb/lxcfile index bee3afd..c91e839 100644 --- a/lxc-services/mariadb/lxcfile +++ b/lxc-services/mariadb/lxcfile @@ -1,6 +1,11 @@ -IMAGE mariadb -LAYER shared/alpine3.9 -LAYER mariadb/mariadb +IMAGE mariadb 10.3.15-190620 +META title MariaDB +META desc-cs Relační databázový systém kompatibilní s MySQL +META desc-en MySQL-compatible relational database management system +META type service +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF # Create OS user (which will be picked up later by apk add) diff --git a/lxc-services/mariadb/meta b/lxc-services/mariadb/meta deleted file mode 100644 index 3c8ce8a..0000000 --- a/lxc-services/mariadb/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "MariaDB", - "desc-en": "MariaDB", - "lxcpath": "mariadb", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-services/postgres/lxcfile b/lxc-services/postgres/lxcfile index e398f79..4888fc0 100644 --- a/lxc-services/postgres/lxcfile +++ b/lxc-services/postgres/lxcfile @@ -1,6 +1,11 @@ -IMAGE postgres -LAYER shared/alpine3.9 -LAYER postgres/postgres +IMAGE postgres 11.3.0-190620 +META title PostgreSQL +META desc-cs Relační databázový systém s podporou pro geografické objekty +META desc-en Relational database management system with support for geographic objects +META type service +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF # Modify OS user (which will be picked up later by apk add) diff --git a/lxc-services/postgres/meta b/lxc-services/postgres/meta deleted file mode 100644 index 10d4b60..0000000 --- a/lxc-services/postgres/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "PostgreSQL", - "desc-en": "PostgreSQL", - "lxcpath": "postgres", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-services/rabbitmq/lxcfile b/lxc-services/rabbitmq/lxcfile index ddeb5c6..6213e4a 100644 --- a/lxc-services/rabbitmq/lxcfile +++ b/lxc-services/rabbitmq/lxcfile @@ -1,6 +1,11 @@ -IMAGE rabbitmq -LAYER shared/alpine3.9 -LAYER rabbitmq/rabbitmq +IMAGE rabbitmq 3.7.11-190620 +META title RabbitMQ +META desc-cs Multiprotokolový message broker +META desc-en Multi-protocol message broker +META type service +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF # Create OS user (which will be picked up later by apk add) diff --git a/lxc-services/rabbitmq/meta b/lxc-services/rabbitmq/meta deleted file mode 100644 index c28040f..0000000 --- a/lxc-services/rabbitmq/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "RabbitMQ", - "desc-en": "RabbitMQ", - "lxcpath": "rabbitmq", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-services/redis/lxcfile b/lxc-services/redis/lxcfile index f8523fb..6802e7d 100644 --- a/lxc-services/redis/lxcfile +++ b/lxc-services/redis/lxcfile @@ -1,6 +1,11 @@ -IMAGE redis -LAYER shared/alpine3.9 -LAYER redis/redis +IMAGE redis 4.0.12-190620 +META title Redis +META desc-cs Pokročilá key-value databáze +META desc-en Advanced key-value store +META type service +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF # Create OS user (which will be picked up later by apk add) diff --git a/lxc-services/redis/meta b/lxc-services/redis/meta deleted file mode 100644 index 4882655..0000000 --- a/lxc-services/redis/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Redis", - "desc-en": "Redis", - "lxcpath": "redis", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-services/solr/lxcfile b/lxc-services/solr/lxcfile index bbed9e6..1445a39 100644 --- a/lxc-services/solr/lxcfile +++ b/lxc-services/solr/lxcfile @@ -1,7 +1,12 @@ -IMAGE solr -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER solr/solr +IMAGE solr 6.5.1-190620 +META title Solr +META desc-cs Platforma pro fulltextové a fasetové vyhledávání +META desc-en Fulltext and faceted search platform +META type service +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 RUN EOF # Install runtime dependencies diff --git a/lxc-services/solr/meta b/lxc-services/solr/meta deleted file mode 100644 index 2ea5d74..0000000 --- a/lxc-services/solr/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Solr", - "desc-en": "Solr", - "lxcpath": "solr", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-java8"] -} diff --git a/lxc-shared/alpine3.8-nodejs8/lxcfile b/lxc-shared/alpine3.8-nodejs8/lxcfile index ce8dbdf..ff83b39 100644 --- a/lxc-shared/alpine3.8-nodejs8/lxcfile +++ b/lxc-shared/alpine3.8-nodejs8/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.8 -LAYER shared/alpine3.8-nodejs8 +IMAGE alpine3.8-nodejs8 8.14.0-190620 +META title Alpine 3.8 Node.js 8 +META desc-cs Základní LXC vrstva s běhovým prostředím pro Node.js 8 +META desc-en Basic LXC layer with Node.js 8 runtime environment +META type layer +META license GPL + +LAYER alpine3.8 3.8.4-190620 RUN EOF apk --no-cache add nodejs diff --git a/lxc-shared/alpine3.8-nodejs8/meta b/lxc-shared/alpine3.8-nodejs8/meta deleted file mode 100644 index b010912..0000000 --- a/lxc-shared/alpine3.8-nodejs8/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro Node.js 8", - "desc-en": "Basic LXC layer with Node.js 8 runtime environment", - "lxcpath": "shared/alpine3.8-nodejs8", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.8"] -} diff --git a/lxc-shared/alpine3.8-php5.6/lxcfile b/lxc-shared/alpine3.8-php5.6/lxcfile index 6c4798b..a7b455e 100644 --- a/lxc-shared/alpine3.8-php5.6/lxcfile +++ b/lxc-shared/alpine3.8-php5.6/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.8 -LAYER shared/alpine3.8-php5.6 +IMAGE alpine3.8-php5.6 5.6.40-190620 +META title Alpine 3.8 PHP 5.6 +META desc-cs Základní LXC vrstva s běhovým prostředím pro PHP 5.6 +META desc-en Basic LXC layer with PHP 5.6 runtime environment +META type layer +META license GPL + +LAYER alpine3.8 3.8.4-190620 RUN EOF apk --no-cache add nginx php5 php5-ctype php5-fpm php5-gd php5-json php5-mcrypt php5-opcache diff --git a/lxc-shared/alpine3.8-php5.6/meta b/lxc-shared/alpine3.8-php5.6/meta deleted file mode 100644 index 436cd06..0000000 --- a/lxc-shared/alpine3.8-php5.6/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro PHP 5", - "desc-en": "Basic LXC layer with PHP 5 runtime environment", - "lxcpath": "shared/alpine3.8-php5.6", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.8"] -} diff --git a/lxc-shared/alpine3.8-ruby2.4/lxcfile b/lxc-shared/alpine3.8-ruby2.4/lxcfile index c390a84..7c9b5a1 100644 --- a/lxc-shared/alpine3.8-ruby2.4/lxcfile +++ b/lxc-shared/alpine3.8-ruby2.4/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.8 -LAYER shared/alpine3.8-ruby2.4 +IMAGE alpine3.8-ruby2.4 2.4.5-190620 +META title Alpine 3.8 Ruby 2.4 +META desc-cs Základní LXC vrstva s běhovým prostředím pro Ruby 2.4 +META desc-en Basic LXC layer with Ruby 2.4 runtime environment +META type layer +META license GPL + +LAYER alpine3.8 3.8.4-190620 RUN EOF # Install Ruby runtime dependencies diff --git a/lxc-shared/alpine3.8-ruby2.4/meta b/lxc-shared/alpine3.8-ruby2.4/meta deleted file mode 100644 index aca5c56..0000000 --- a/lxc-shared/alpine3.8-ruby2.4/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro Ruby 2.4", - "desc-en": "Basic LXC layer with Ruby 2.4 runtime environment", - "lxcpath": "shared/alpine3.8-ruby2.4", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.8"] -} diff --git a/lxc-shared/alpine3.8/lxcfile b/lxc-shared/alpine3.8/lxcfile index 620675a..369510a 100644 --- a/lxc-shared/alpine3.8/lxcfile +++ b/lxc-shared/alpine3.8/lxcfile @@ -1,5 +1,10 @@ -IMAGE build -LAYER shared/alpine3.8 +IMAGE alpine3.8 3.8.4-190620 +META title Alpine 3.8 +META desc-cs Základní LXC vrstva s Alpine linuxem 3.8 +META desc-en Basic LXC layer with Alpine linux 3.8 +META type layer +META license GPL + COPY https://github.com/gliderlabs/docker-alpine/raw/rootfs/library-3.8/x86_64/versions/library-3.8/x86_64/rootfs.tar.xz RUN EOF diff --git a/lxc-shared/alpine3.8/meta b/lxc-shared/alpine3.8/meta deleted file mode 100644 index f9f8724..0000000 --- a/lxc-shared/alpine3.8/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s Alpine linuxem", - "desc-en": "Basic LXC layer with Alpine linux", - "lxcpath": "shared/alpine3.8", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": [] -} diff --git a/lxc-shared/alpine3.9-java8/lxcfile b/lxc-shared/alpine3.9-java8/lxcfile index 6f702dc..6c4f689 100644 --- a/lxc-shared/alpine3.9-java8/lxcfile +++ b/lxc-shared/alpine3.9-java8/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 +IMAGE alpine3.9-java8 8.212.04-190620 +META title Alpine 3.9 OpenJDK 8 +META desc-cs Základní LXC vrstva s běhovým prostředím pro Javu 8 +META desc-en Basic LXC layer with Java 8 runtime environment +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF # nss needed due to https://github.com/docker-library/openjdk/issues/289 , https://bugs.alpinelinux.org/issues/10126 diff --git a/lxc-shared/alpine3.9-java8/meta b/lxc-shared/alpine3.9-java8/meta deleted file mode 100644 index 8b3a3b9..0000000 --- a/lxc-shared/alpine3.9-java8/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro Javu", - "desc-en": "Basic LXC layer with Java runtime environment", - "lxcpath": "shared/alpine3.9-java8", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-shared/alpine3.9-nodejs10/lxcfile b/lxc-shared/alpine3.9-nodejs10/lxcfile index ca88e53..a13beb7 100644 --- a/lxc-shared/alpine3.9-nodejs10/lxcfile +++ b/lxc-shared/alpine3.9-nodejs10/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-nodejs10 +IMAGE alpine3.9-nodejs10 10.14.2-190620 +META title Alpine 3.9 Node.js 10 +META desc-cs Základní LXC vrstva s běhovým prostředím pro Node.js 10 +META desc-en Basic LXC layer with Node.js 10 runtime environment +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF apk --no-cache add nodejs diff --git a/lxc-shared/alpine3.9-nodejs10/meta b/lxc-shared/alpine3.9-nodejs10/meta deleted file mode 100644 index 8272507..0000000 --- a/lxc-shared/alpine3.9-nodejs10/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro Node.js 10", - "desc-en": "Basic LXC layer with Node.js 10 runtime environment", - "lxcpath": "shared/alpine3.9-nodejs10", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-shared/alpine3.9-php7.2/lxcfile b/lxc-shared/alpine3.9-php7.2/lxcfile index 02519a9..7e6e145 100644 --- a/lxc-shared/alpine3.9-php7.2/lxcfile +++ b/lxc-shared/alpine3.9-php7.2/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-php7.2 +IMAGE alpine3.9-php7.2 7.2.19-190620 +META title Alpine 3.9 PHP 7.2 +META desc-cs Základní LXC vrstva s běhovým prostředím pro PHP 7.2 +META desc-en Basic LXC layer with PHP 7.2 runtime environment +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF apk --no-cache add nginx php7 php7-ctype php7-fpm php7-gd php7-json php7-mbstring php7-mcrypt php7-opcache php7-session diff --git a/lxc-shared/alpine3.9-php7.2/meta b/lxc-shared/alpine3.9-php7.2/meta deleted file mode 100644 index d4d674d..0000000 --- a/lxc-shared/alpine3.9-php7.2/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro PHP 7", - "desc-en": "Basic LXC layer with PHP 7 runtime environment", - "lxcpath": "shared/alpine3.9-php7.2", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-shared/alpine3.9-python2.7/lxcfile b/lxc-shared/alpine3.9-python2.7/lxcfile index 6de6f11..97584cc 100644 --- a/lxc-shared/alpine3.9-python2.7/lxcfile +++ b/lxc-shared/alpine3.9-python2.7/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python2.7 +IMAGE alpine3.9-python2.7 2.7.16-190620 +META title Alpine 3.9 python 2.7 +META desc-cs Základní LXC vrstva s běhovým prostředím pro python 2.7 +META desc-en Basic LXC layer with python 2.7 runtime environment +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF apk --no-cache add python2 diff --git a/lxc-shared/alpine3.9-python2.7/meta b/lxc-shared/alpine3.9-python2.7/meta deleted file mode 100644 index 63dd5e3..0000000 --- a/lxc-shared/alpine3.9-python2.7/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro python 2", - "desc-en": "Basic LXC layer with python 2 runtime environment", - "lxcpath": "shared/alpine3.9-python2.7", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-shared/alpine3.9-python3.6/lxcfile b/lxc-shared/alpine3.9-python3.6/lxcfile index 0ed3a03..fced4c2 100644 --- a/lxc-shared/alpine3.9-python3.6/lxcfile +++ b/lxc-shared/alpine3.9-python3.6/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-python3.6 +IMAGE alpine3.9-python3.6 3.6.8-190620 +META title Alpine 3.9 python 3.6 +META desc-cs Základní LXC vrstva s běhovým prostředím pro python 3.6 +META desc-en Basic LXC layer with python 3.6 runtime environment +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF apk --no-cache add python3 diff --git a/lxc-shared/alpine3.9-python3.6/meta b/lxc-shared/alpine3.9-python3.6/meta deleted file mode 100644 index df9ebb4..0000000 --- a/lxc-shared/alpine3.9-python3.6/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro python 3", - "desc-en": "Basic LXC layer with python 3 runtime environment", - "lxcpath": "shared/alpine3.9-python3.6", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-shared/alpine3.9-ruby2.4/lxcfile b/lxc-shared/alpine3.9-ruby2.4/lxcfile index c0c034c..15f0702 100644 --- a/lxc-shared/alpine3.9-ruby2.4/lxcfile +++ b/lxc-shared/alpine3.9-ruby2.4/lxcfile @@ -1,6 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-ruby2.4 +IMAGE alpine3.9-ruby2.4 2.4.5-190620 +META title Alpine 3.9 Ruby 2.4 +META desc-cs Základní LXC vrstva s běhovým prostředím pro Ruby 2.4 +META desc-en Basic LXC layer with Ruby 2.4 runtime environment +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 RUN EOF # Install Ruby runtime dependencies diff --git a/lxc-shared/alpine3.9-ruby2.4/meta b/lxc-shared/alpine3.9-ruby2.4/meta deleted file mode 100644 index 66bfb39..0000000 --- a/lxc-shared/alpine3.9-ruby2.4/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s běhovým prostředím pro Ruby 2.4", - "desc-en": "Basic LXC layer with Ruby 2.4 runtime environment", - "lxcpath": "shared/alpine3.9-ruby2.4", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9"] -} diff --git a/lxc-shared/alpine3.9-tomcat7/lxcfile b/lxc-shared/alpine3.9-tomcat7/lxcfile index 8ab8bd3..b2192e9 100644 --- a/lxc-shared/alpine3.9-tomcat7/lxcfile +++ b/lxc-shared/alpine3.9-tomcat7/lxcfile @@ -1,7 +1,12 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-tomcat7 +IMAGE alpine3.9-tomcat7 7.0.94-190620 +META title Alpine 3.9 Tomcat 7 +META desc-cs Základní LXC vrstva s JSP a servlet kontejnerem Tomcat 7 +META desc-en Basic LXC layer with Tomcat 7 JSP and servlet container +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 RUN EOF # Install Tomcat 7 diff --git a/lxc-shared/alpine3.9-tomcat7/meta b/lxc-shared/alpine3.9-tomcat7/meta deleted file mode 100644 index 374d387..0000000 --- a/lxc-shared/alpine3.9-tomcat7/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s JSP a servlet kontejnerem Tomcat 8", - "desc-en": "Basic LXC layer with Tomcat 8 JSP and servlet container", - "lxcpath": "shared/alpine3.9-tomcat7", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-java8"] -} diff --git a/lxc-shared/alpine3.9-tomcat8.5/lxcfile b/lxc-shared/alpine3.9-tomcat8.5/lxcfile index 229aa79..0414ff4 100644 --- a/lxc-shared/alpine3.9-tomcat8.5/lxcfile +++ b/lxc-shared/alpine3.9-tomcat8.5/lxcfile @@ -1,7 +1,12 @@ -IMAGE build -LAYER shared/alpine3.9 -LAYER shared/alpine3.9-java8 -LAYER shared/alpine3.9-tomcat8.5 +IMAGE alpine3.9-tomcat8.5 8.5.41-190620 +META title Alpine 3.9 Tomcat 8.5 +META desc-cs Základní LXC vrstva s JSP a servlet kontejnerem Tomcat 8.5 +META desc-en Basic LXC layer with Tomcat 8.5 JSP and servlet container +META type layer +META license GPL + +LAYER alpine3.9 3.9.4-190620 +LAYER alpine3.9-java8 8.212.04-190620 RUN EOF # Install Tomcat 8.5 diff --git a/lxc-shared/alpine3.9-tomcat8.5/meta b/lxc-shared/alpine3.9-tomcat8.5/meta deleted file mode 100644 index c3de862..0000000 --- a/lxc-shared/alpine3.9-tomcat8.5/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s JSP a servlet kontejnerem Tomcat 8.5", - "desc-en": "Basic LXC layer with Tomcat 8.5 JSP and servlet container", - "lxcpath": "shared/alpine3.9-tomcat8.5", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": ["alpine3.9-java8"] -} diff --git a/lxc-shared/alpine3.9/lxcfile b/lxc-shared/alpine3.9/lxcfile index 9017dba..265717c 100644 --- a/lxc-shared/alpine3.9/lxcfile +++ b/lxc-shared/alpine3.9/lxcfile @@ -1,7 +1,11 @@ -IMAGE build -LAYER shared/alpine3.9 -COPY https://github.com/gliderlabs/docker-alpine/raw/rootfs/library-3.9/x86_64/versions/library-3.9/x86_64/rootfs.tar.xz +IMAGE alpine3.9 3.9.4-190620 +META title Alpine 3.9 +META desc-cs Základní LXC vrstva s Alpine linuxem 3.9 +META desc-en Basic LXC layer with Alpine linux 3.9 +META type layer +META license GPL +COPY https://github.com/gliderlabs/docker-alpine/raw/rootfs/library-3.9/x86_64/versions/library-3.9/x86_64/rootfs.tar.xz COPY lxc RUN EOF diff --git a/lxc-shared/alpine3.9/meta b/lxc-shared/alpine3.9/meta deleted file mode 100644 index 2a8b758..0000000 --- a/lxc-shared/alpine3.9/meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "desc-cs": "Základní LXC vrstva s Alpine linuxem", - "desc-en": "Basic LXC layer with Alpine linux", - "lxcpath": "shared/alpine3.9", - "version": "0.0.1", - "release": "0", - "license": "GPL", - "depends": [] -}