-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathbuild
More file actions
executable file
·25 lines (21 loc) · 870 Bytes
/
build
File metadata and controls
executable file
·25 lines (21 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/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}
# First build and push the app - notice no tag on the image name
cd app
docker build ${NOCACHE} -t ${REGISTRY}/gallery . --platform linux/amd64
docker push ${REGISTRY}/gallery:latest
cd ..
# Second build and push the job - notice no tag on the image name
cd job
docker build ${NOCACHE} -t ${REGISTRY}/gallery-job . --platform linux/amd64
docker push ${REGISTRY}/gallery-job:latest
cd ..