summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..ba48e56
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+remote="g.freya.cat"
+user="freya"
+
+docker login "$remote" -u "$user"
+
+build() {
+ image="$(echo "$1" | tr -d './')"
+ echo "building $image"
+ docker build "$image" -t "$remote/$user/$image:latest"
+ docker push "$remote/$user/$image"
+}
+
+if [ "$#" -gt 0 ]; then
+ build "$1"
+else
+ images="$(find . -mindepth 1 -type d \( -name '.*' -prune -o -print \))"
+ IFS=$'\n'
+ for image in $images; do build "$image"; done;
+fi