#!/bin/sh # script/docker: build the repo's Docker images, tagged from # script/projectname: the frontend image as and the backend image # as -server. Both build from the repo root as their context. 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" -f Dockerfile . timeout 300 docker build -t "$name-server" -f Dockerfile.backend . } main "$@"