Skip to content

Commit 49fdd6a

Browse files
authored
Merge pull request #13 from YaoZengzeng/build
add build scripts
2 parents eab348c + 6d3ddbd commit 49fdd6a

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM istio/proxyv2:1.24.0
2+
3+
COPY envoy /usr/local/bin
4+
5+
ENTRYPOINT ["/usr/local/bin/pilot-agent"]

build.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Build waypoint image in the x86 env:
4+
# ARCH=x86 bash build.sh
5+
#
6+
# Build waypoint image in the arm env:
7+
# ARCH=arm bash build.sh
8+
9+
REPO=${1:-"kmesh-net"}
10+
11+
# Build Envoy
12+
BUILD_WITH_CONTAINER=1 make build_envoy
13+
14+
docker create --name temp -v cache:/home/.cache busybox
15+
16+
if [ "$ARCH" = "arm" ]; then
17+
docker cp temp:/home/.cache/bazel/_bazel_root/1e0bb3bee2d09d2e4ad3523530d3b40c/execroot/io_istio_proxy/bazel-out/aarch64-opt/bin/envoy .
18+
else
19+
docker cp temp:/home/.cache/bazel/_bazel_root/1e0bb3bee2d09d2e4ad3523530d3b40c/execroot/io_istio_proxy/bazel-out/k8-opt/bin/envoy .
20+
fi
21+
22+
docker rm temp
23+
24+
if [ "$ARCH" = "arm" ]; then
25+
docker build . --no-cache -t ghcr.io/$REPO/waypoint-arm:latest
26+
elif [ "$ARCH" = "x86" ]; then
27+
docker build . --no-cache -t ghcr.io/$REPO/waypoint-x86:latest
28+
else
29+
docker build . --no-cache -t ghcr.io/$REPO/waypoint:latest
30+
fi
31+
32+
rm envoy

0 commit comments

Comments
 (0)