-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
23 lines (19 loc) · 764 Bytes
/
build.sh
File metadata and controls
23 lines (19 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
set -eo pipefail
ALPINE_VERSION=3.11.6
TERRAFORM_VERSION=0.12.24
AZURE_CLI_VERSION=2.5.1
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
case "$KEY" in
ALPINE_VERSION) ALPINE_VERSION=${VALUE} ;;
TERRAFORM_VERSION) TERRAFORM_VERSION=${VALUE} ;;
AZURE_CLI_VERSION) AZURE_CLI_VERSION=${VALUE} ;;
*)
esac
done
echo "Building devops cli image using parameters provided..."
docker build --build-arg ALPINE_VERSION="$ALPINE_VERSION" --build-arg TERRAFORM_VERSION="$TERRAFORM_VERSION" --build-arg AZURE_CLI_VERSION="$AZURE_CLI_VERSION" -t ryanmcafee/devops-cli .
echo "Completed building container!"