Skip to content

Commit

Permalink
Merge pull request #1095 from sarathchandra24/fix-build-args-fluentd
Browse files Browse the repository at this point in the history
fix build args fluentd image
  • Loading branch information
benjaminhuo authored Apr 4, 2024
2 parents 9f28af7 + 9a7b322 commit 8e2174a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ build-fd-arm64-base: prepare-build

# Use docker buildx to build arm64 Fluentd container image
build-fd-arm64: prepare-build
docker buildx build --push --platform linux/arm64 -f cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick . -t ${FD_IMG}${ARCH}
docker buildx build --push --platform linux/arm64 -f cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick . -t ${FD_IMG}${ARCH} --build-arg ${FD_IMG_BASE} --build-arg ${FD_IMG_BASE_TAG}

# Prepare for arm64 building
prepare-build:
Expand Down
8 changes: 5 additions & 3 deletions cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=kubesphere/fluentd
ARG BASE_IMAGE_TAG=latest-arm64-base
# Fluentd watcher agent
FROM golang:1.20.4-alpine3.16 as buildergo
RUN mkdir -p /fluentd
Expand All @@ -8,8 +10,8 @@ RUN echo $(ls -al /code)
RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go

# Fluentd main image
FROM kubesphere/fluentd:v1.15.3-arm64-base
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.15.3"
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version=${BASE_IMAGE_TAG}
ENV TINI_VERSION=0.18.0

# Do not split this into multiple RUN!
Expand Down Expand Up @@ -46,4 +48,4 @@ COPY ./cmd/fluent-watcher/fluentd/app/app.conf /fluentd/etc/
# copy the output in buildergo
COPY --from=buildergo /fluentd/fluentd-watcher /fluentd/bin/fluentd-watcher
# Entry point
ENTRYPOINT ["/fluentd/bin/fluentd-watcher"]
ENTRYPOINT ["/fluentd/bin/fluentd-watcher"]

0 comments on commit 8e2174a

Please sign in to comment.