#!/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 ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" main() { cd "$ROOT" name="$("$ROOT/script/projectname")" timeout 300 docker build -t "$name" -f Dockerfile . timeout 300 docker build -t "$name-server" -f Dockerfile.backend . } main "$@"