forked from ava-labs/avalanchego
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_bootstrap_monitor_image.sh
More file actions
executable file
·30 lines (22 loc) · 1.3 KB
/
build_bootstrap_monitor_image.sh
File metadata and controls
executable file
·30 lines (22 loc) · 1.3 KB
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
26
27
28
29
30
#!/usr/bin/env bash
set -euo pipefail
# e.g.,
# ./scripts/build_bootstrap_monitor_image.sh # Build local image
# DOCKER_IMAGE=my-bootstrap-monitor ./scripts/build_bootstrap_monitor_image.sh # Build local single arch image with a custom image name
# DOCKER_IMAGE=avaplatform/bootstrap-monitor ./scripts/build_bootstrap_monitor_image.sh # Build and push image to docker hub
# Builds the image for the bootstrap monitor
# Directory above this script
AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
# Load the constants
source "$AVALANCHE_PATH"/scripts/constants.sh
# The published name should be 'avaplatform/bootstrap-monitor', but to avoid unintentional pushes it
# is defaulted to 'bootstrap-monitor' (without a repo or registry name) which can only be used to
# create local images.
export DOCKER_IMAGE=${DOCKER_IMAGE:-"bootstrap-monitor"}
# Skip building the race image
export SKIP_BUILD_RACE=1
# Reuse the avalanchego build script for convenience. The image will have a CMD of "./avalanchego", so
# to run the bootstrap monitor will need to specify ./bootstrap-monitor".
#
# TODO(marun) Figure out how to set the CMD for a multi-arch image.
bash -x "${AVALANCHE_PATH}"/scripts/build_image.sh --build-arg BUILD_SCRIPT=build_bootstrap_monitor.sh