-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
43 lines (35 loc) · 980 Bytes
/
build.sh
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
#!/bin/bash
set -ex
NODE_VERSION=18.19.0
OS_NAME=${OS_NAME:-ubuntu}
BUILD_ARGS="--build-arg NODE_VERSION=${NODE_VERSION} \
"
# export VERSION_NAME_PREFIX=""
# if [ "$OS_NAME" = "alpine" ] ; then
# export VERSION_NAME_PREFIX="alpine-"
# fi
# BUILD_TAG_CORE=$(node ci/get_image_build_tag.js core)
# BUILD_TAG_COMPILER=$(node ci/get_image_build_tag.js compiler)
# BUILD_TAG_RUNTIME=$(node ci/get_image_build_tag.js runtime)
if [ "$NEED_PUSH" = "1" ] ; then
PLATFORM="--platform=linux/arm64,linux/amd64"
PARAM_OUTPUT="--push"
else
PLATFORM=""
PARAM_OUTPUT="-o type=docker"
fi
docker build -f node.dockerfile core \
$PLATFORM \
$BUILD_ARGS \
--target core \
-t yunnysunny/node $PARAM_OUTPUT
docker build -f node.dockerfile compiler \
$PLATFORM \
$BUILD_ARGS \
--target compiler \
-t yunnysunny/node-compiler $PARAM_OUTPUT
docker build -f node.dockerfile xtransit \
$PLATFORM \
$BUILD_ARGS \
--target xtransit \
-t yunnysunny/node-xtransit $PARAM_OUTPUT