Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build args fluentd image #1095

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"]