#!/bin/sh # script/docker: build both Docker images, tagged with the project name # from script/projectname: the frontend as , from Dockerfile, and # the backend as -server, from Dockerfile.backend. set -eu SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)" main() { cd "$ROOT" name="$("$SCRIPT_DIR/projectname")" timeout 300 docker build -t "$name" . timeout 300 docker build -t "$name-server" -f Dockerfile.backend . } main "$@"