Skip to content

Instantly share code, notes, and snippets.

@wheelq
Last active May 10, 2019 11:18
Show Gist options
  • Save wheelq/3d1cda83311cc2b8035e7f40b4200d9b to your computer and use it in GitHub Desktop.
Save wheelq/3d1cda83311cc2b8035e7f40b4200d9b to your computer and use it in GitHub Desktop.
Create docker build.sh and build the image
#!/usr/bin/env bash
#Author: Michael Wiczynski <wheelq@gmail.com>
#Date: 2019-03-24
#Description: build image
###############################################################################
# Variables
###############################################################################
_build_project="${1}"
_build_app="${2}"
_build_version="${3}"
if [[ $# -eq 0 ]] ; then
echo "No params provided. RC:1"
exit 1
fi
if [[ -z "${1}" ]] ; then
echo "No project defined. RC:1"
exit 1
elif [[ -z "${2}" ]] ; then
echo "No app name defined. RC:1"
exit 1
fi
###############################################################################
# Environment
###############################################################################
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
docker build --force-rm --tag "${1}/${2}" .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment