#!/bin/bash set -e build_www_dir() { docker build -t kasmweb/www -f builder/dockerfile.www.build . docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest } cd "$(dirname "$0")/.." . builder/os_ver_cli.sh build_www_dir docker pull "$os_image" docker build -t kasmvncbuilder:$os_codename \ -f builder/dockerfile.${os}_${os_codename}.build . mkdir -p builder/build docker run -v /tmp:/build --rm kasmvncbuilder:$os_codename L_GID=$(id -g) L_UID=$(id -u) tarball_name="kasmvnc.${os}_${os_codename}.tar.gz" chown $L_UID:$L_GID /tmp/$tarball_name mv /tmp/$tarball_name $PWD/builder/build/