-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·38 lines (33 loc) · 832 Bytes
/
build.sh
File metadata and controls
executable file
·38 lines (33 loc) · 832 Bytes
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
#!/bin/bash
echo ""
echo "-----------------------------------------------------"
echo "Building Probo Notifier Image"
echo "-----------------------------------------------------"
help() {
echo "build.sh - script to build the Probo Notifier image"
echo ""
echo "Usage:"
echo "./build.sh <repository_name> <tag>"
echo ""
echo "Example: To build an image tagged 'dev' for DockerHub on my account:"
echo "./build.sh mbagnall dev\n"
echo ""
echo "Example: To build an image tagged 'dev' on a private registry with"
echo "the 'probo' namespace:"
echo "./build.sh docker.example.com/probo dev"
echo ""
exit 1;
}
if [ -n "$2" ]; then
export tag=$2
else
help
fi
if [ -z "$1" ]; then
help
fi
echo -n "Hash: "
docker build . -q -t $1/notifier:$tag
echo -n "Repo: "
docker push -q $1/notifier:$tag
echo ""