We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6a0dba commit 3dc98b1Copy full SHA for 3dc98b1
build.sh
@@ -0,0 +1,28 @@
1
+#!/bin/bash
2
+
3
+set -euo pipefail
4
5
+readonly path="$1"
6
+readonly container=$(echo $path | cut -d '/' -f 1)
7
+readonly version=$(echo $path | cut -d '/' -f 2)
8
9
+now="$(date --utc --iso-8601=seconds)"
10
+repo_url="https://github.com/BioImageTools/containers"
11
+tag="ghcr.io/bioimagetools/$container:$version"
12
13
+docker build \
14
+ --label org.opencontainers.image.source="$repo_url" \
15
+ --label org.opencontainers.image.created="$now" \
16
+ --tag $tag \
17
+ ./$container/$version
18
19
+read -r -p "Do you want to push this image to GCR? [y/N] " response
20
+case "$response" in
21
+ [yY][eE][sS]|[yY])
22
+ docker push $tag
23
+ ;;
24
+ *)
25
+ echo "You can push it later like this: docker push $tag"
26
27
+esac
28
0 commit comments