-
Notifications
You must be signed in to change notification settings - Fork 16
/
hosted-dual.env
46 lines (33 loc) · 1.5 KB
/
hosted-dual.env
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# source these envs before running build_images.sh
# example of envs used to build both AMD64 and ARM64 images combine,
# hosted and pushed docker image provider
# docker environment needs to be already setup and logged in
#docker buildx create --use --name tari-builder --platform linux/arm64,linux/amd64
#docker run -it --rm --privileged tonistiigi/binfmt --install all
# Location of Tari source code
export TARI_SOURCE_ROOT="../tari"
export TBN_ARCH=x86-64
export TBN_FEATURES=safe
export TL_TAG_URL=quay.io/tarilabs
export TL_TAG_ALIAS=latest
#export TL_TAG_BUILD_OPTS="buildx build -o type=docker --progress=plain --platform linux/amd64 --no-cache"
#export TL_TAG_BUILD_OPTS="buildx build --platform linux/amd64,linux/arm64 --push"
export TL_TAG_BUILD_OPTS="\
buildx build \
--progress=plain \
--platform linux/amd64,linux/arm64 \
--push \
--cache-from type=local,src=/tmp/docker-cache \
--cache-to type=local,dest=/tmp/docker-cache,mode=max \
"
# Pull App version from file
VAPP=$(awk -F ' = ' \
'$1 ~ /^version/ { gsub(/["]/, "", $2); printf("%s",$2) }' \
"${TARI_SOURCE_ROOT}/applications/minotari_node/Cargo.toml")
VBRANCH=$(git --git-dir ${TARI_SOURCE_ROOT}/.git branch --show-current)
VSHA_SHORT=$(git --git-dir ${TARI_SOURCE_ROOT}/.git rev-parse --short HEAD)
export SUBTAG_EXTRA="_v${VAPP}_${VBRANCH}_$(date -u '+%Y%m%d')_${VSHA_SHORT}"
# Docker Build extra commands
#export TL_TAG_BUILD_Extra=" --build-arg RUST_TOOLCHAIN=stable "
# Override Network
#export TARI_NETWORK=esme