2626# # AWS_REGION - will be set to AWS_DEFAULT_REGION if not set externally.
2727export AWS_DEFAULT_REGION = us-west-2
2828export AWS_REGION = $( aws configure get region)
29- # export AWS_REGION=$(aws ec2 describe-availability-zones --output text --query 'AvailabilityZones[0].[RegionName]')
3029if [ "${AWS_REGION}" == "" ]; then
3130 export AWS_REGION = $AWS_DEFAULT_REGION
3231fi
3534# # If REGISTRY==default, then the default elastic container registry in the account for the current region will be used
3635export REGISTRY = default
3736# # Set default registry if needed
37+ export REGION = ${ AWS_REGION }
3838if [ "$REGISTRY" == "default" ]; then
39- export REGION = ${ AWS_REGION }
4039 export ACCOUNT = $( aws sts get-caller-identity --query Account --output text)
4140 if [ "$ACCOUNT" == "" ]; then
4241 export REGISTRY = " "
5352
5453# # IMAGE: <required> - Docker image name for this project. Example: myapp
5554export IMAGE = aws-do-hyperpod
55+ # # MOD: [optional] - modifier of image build that controls whether certain non-essential components are installed
56+ # # this is done to control image size. If MOD="" then everything is included, if MOD="compact" then only required components are included.
57+ # export MOD=compact
58+ export MOD = " "
59+ export MOD_TAG = $( if [ " $MOD " == " " ]; then echo " " ; else echo " -${MOD} " ; fi )
5660# # VERSION: [optional] - Version tag for this Docker image. Example: v20180302
5761# export VERSION=v$(date +%Y%m%d)
5862export VERSION = v20240910
59- export TAG = $( if [ -z " ${VERSION} " ]; then echo " " ; else echo " :${VERSION} " ; fi )
63+ export TAG = $( if [ -z " ${VERSION} " ]; then echo " :latest ${MOD_TAG} " ; else echo " :${VERSION}${MOD_TAG } " ; fi )
6064# # BUILD_OPTS: [optional] - arguments for the docker image build command
61- export BUILD_OPTS = " --progress plain --build-arg http_proxy=${ http_proxy } --build-arg https_proxy=${ https_proxy } --build-arg no_proxy=${ no_proxy } "
65+ export BUILD_OPTS = " --progress plain --build-arg http_proxy=${ http_proxy } --build-arg https_proxy=${ https_proxy } --build-arg no_proxy=${ no_proxy } --build-arg MOD= ${ MOD } "
6266
6367# Docker container runtime settings
6468# # CONTAINER_NAME: [optional] - Name of the Docker container including the --name switch. Example --name myapp
@@ -71,7 +75,7 @@ export VOL_MAP="-v ${HOME}/.aws:/root/.aws -v ${HOME}/.kube:/root/.kube -v $(pwd
7175# # Network [optional] - Network name including the --net switch. Example --net mynet
7276# export NETWORK=
7377# # RUN_OPTS [optional] - additional options to specify with the run comman. Example -e POSTGRES_DB=dbname
74- export RUN_OPTS = " -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy -e REGION=$REGION -e AWS_DEFAULT_REGION=$REGION "
78+ export RUN_OPTS = " -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy -e REGION=$REGION -e AWS_REGION= $REGION -e AWS_DEFAULT_REGION=$REGION "
7579if [ -f ${HOME}/.aws/credentials ]; then
7680 export RUN_OPTS = " ${ RUN_OPTS } -e AWS_PROFILE=$AWS_PROFILE "
7781fi
0 commit comments