forked from catalinpan/aws-ecr-proxy
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·43 lines (39 loc) · 1.02 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·43 lines (39 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
usage () {
printf "NAME\n"
printf " build.sh -- build a new Docker image.\n"
printf "SYNOPSIS\n"
printf " build.sh [options]\n"
printf "DESCRIPTION\n"
printf " build.sh is a tool to build a new Docker image.\n"
printf "OPTIONS\n"
printf " -h, --help\n"
printf " Usage help. This lists all current command line options with a short description.\n"
printf " --name=<value>\n"
printf " The name of the Docker image to build, default to 'catalinpan/aws-ecr-proxy'.\n"
printf " --version\n"
printf " The version of the Docker image to build, default to the content of 'version.txt'.\n"
}
NAME=proreact/aws-ecr-proxy
VERSION=$(cat version.txt)
while [ $# -gt 0 ]
do
case $1 in
-h | --help)
usage
exit
;;
--name=*)
NAME=${1#*=}
;;
--version=*)
VERSION=${1#*=}
;;
*)
usage
exit
;;
esac
shift
done
docker build --pull -t "${NAME}:${VERSION}" .