Skip to content

Commit

Permalink
build: add busybox to image
Browse files Browse the repository at this point in the history
  • Loading branch information
xzchaoo committed Mar 27, 2024
1 parent fa72556 commit 6e9eba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions scripts/docker/Dockerfile-local
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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
Expand Down

0 comments on commit 6e9eba4

Please sign in to comment.