forked from IBM/CodeEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·21 lines (17 loc) · 793 Bytes
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# Env Vars:
# REGISTRY: name of the image registry/namespace to store the images
# NOCACHE: set this to "--no-cache" to turn off the Docker build cache
#
# NOTE: to run this you MUST set the REGISTRY environment variable to
# your own image registry/namespace otherwise the `docker push` commands
# will fail due to an auth failure. Which means, you also need to be logged
# into that registry before you run it.
set -ex
export REGISTRY=${REGISTRY:-icr.io/codeengine}
# Build the images
docker build ${NOCACHE} -f Dockerfile.sender -t ${REGISTRY}/kafka-sender . --platform linux/amd64
docker build ${NOCACHE} -f Dockerfile.receiver -t ${REGISTRY}/kafka-receiver . --platform linux/amd64
# And push it
docker push ${REGISTRY}/kafka-sender
docker push ${REGISTRY}/kafka-receiver