aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/microservices/build-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/microservices/build-image.sh')
-rwxr-xr-xvnfs/DAaaS/microservices/build-image.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/vnfs/DAaaS/microservices/build-image.sh b/vnfs/DAaaS/microservices/build-image.sh
new file mode 100755
index 00000000..61e09057
--- /dev/null
+++ b/vnfs/DAaaS/microservices/build-image.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -o nounset
+set -o errexit
+set -o pipefail
+
+OPERATOR=$1
+OPERATOR_IMAGE=$2
+echo "Building $OPERATOR image $OPERATOR_IMAGE"
+CMD="export GO111MODULE=on && cd $OPERATOR && operator-sdk build $OPERATOR_IMAGE"
+
+docker build -f Dockerfile.ci . -t operator-image-builder:latest
+
+docker run --rm -it \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ -v $PWD:/app/demo/vnfs/DAaaS/microservices \
+ operator-image-builder:latest bash -c "$CMD"
+