diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 6fa2f05..5d547a5 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,4 +1,6 @@ -FROM holoinsight/agent-builder:1.0.1 as builder +FROM --platform=$BUILDPLATFORM busybox:musl as busybox + +FROM --platform=$BUILDPLATFORM holoinsight/agent-builder:1.0.1 as builder ARG GO111MODULE=on ARG GOPROXY=direct # Users in China can use GOPROXY to speed up building. @@ -30,6 +32,7 @@ COPY scripts/api /usr/local/holoinsight/agent/api COPY scripts/docker/init.sh /usr/local/holoinsight/agent/bin/init.sh COPY --from=builder /agent /usr/local/holoinsight/agent/bin/agent COPY --from=builder /helper /usr/local/holoinsight/agent/bin/helper +COPY --from=busybox /bin/busybox /usr/local/holoinsight/agent/bin/busybox VOLUME /usr/local/holoinsight/agent/data VOLUME /usr/local/holoinsight/agent/logs diff --git a/scripts/docker/Dockerfile-local b/scripts/docker/Dockerfile-local index a9d8930..318bed5 100644 --- a/scripts/docker/Dockerfile-local +++ b/scripts/docker/Dockerfile-local @@ -1,3 +1,4 @@ +FROM --platform=$BUILDPLATFORM busybox:musl as busybox FROM --platform=$BUILDPLATFORM holoinsight/agent-base:1.0.0 COPY scripts/docker/sc /usr/local/bin/ @@ -16,6 +17,7 @@ COPY scripts/api /usr/local/holoinsight/agent/api COPY scripts/docker/init.sh /usr/local/holoinsight/agent/bin/init.sh COPY ./build/linux-amd64/bin/agent /usr/local/holoinsight/agent/bin/agent COPY ./build/linux-amd64/bin/helper /usr/local/holoinsight/agent/bin/helper +COPY --from=busybox /bin/busybox /usr/local/holoinsight/agent/bin/busybox VOLUME /usr/local/holoinsight/agent/data VOLUME /usr/local/holoinsight/agent/logs