aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/microservices/build-image.sh
blob: 61e090575a65d06102ab5b6dd0bc42283440a071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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"