#!/usr/bin/env sh if ! [ -x "$(command -v docker-compose)" ]; then echo 'Error: docker-compose is not installed.' >&2 exit 1 fi set -e set -a [ -f devops/docker/.env ] && . devops/docker/.env set +a color="\e[34m" defaultColor="\e[0m" # shellcheck disable=SC2028 echo "$color\n### Building containers ... $defaultColor" docker-compose build \ --build-arg HOME=$HOME \ --build-arg USER=$USER \ --build-arg UID=$(id -u) \ --build-arg GID=$(id -g) \ --build-arg COMPOSER_VERSION=$COMPOSER_VERSION # shellcheck disable=SC2028 echo "$color\n### Creating .env ... $defaultColor" ENV_FILE=.env if [ ! -f "$ENV_FILE" ]; then cp devops/dist/.env-dist "$ENV_FILE" echo "Successfully created" else echo ".env file already exists" fi