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

dockerfiles: Add FLB_ENFORCE_ALIGNMENT variable #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
ARG RELEASE_VERSION=3.1.7

# For multi-arch builds - assumption is running on an AMD64 host
FROM multiarch/qemu-user-static:x86_64-arm as qemu-arm32

Check warning on line 17 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 17 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu-arm64

Check warning on line 18 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 18 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

FROM debian:bookworm-slim as builder-base

Check warning on line 20 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 20 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
Expand All @@ -28,9 +28,12 @@
ARG FLB_CHUNK_TRACE=On
ENV FLB_CHUNK_TRACE=${FLB_CHUNK_TRACE}

ARG FLB_ENFORCE_ALIGNMENT=Off
ENV FLB_ENFORCE_ALIGNMENT=${FLB_ENFORCE_ALIGNMENT}

RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log

ENV DEBIAN_FRONTEND noninteractive

Check warning on line 36 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 36 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# hadolint ignore=DL3008
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \
Expand Down Expand Up @@ -61,7 +64,7 @@
COPY . ./

# We split the builder setup out so people can target it or use as a base image without doing a full build.
FROM builder-base as builder

Check warning on line 67 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 67 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /src/fluent-bit/build/
RUN cmake -DFLB_RELEASE=On \
-DFLB_JEMALLOC=On \
Expand All @@ -76,6 +79,7 @@
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_LOG_NO_CONTROL_CHARS=On \
-DFLB_CHUNK_TRACE="$FLB_CHUNK_TRACE" \
-DFLB_ENFORCE_ALIGNMENT="$FLB_ENFORCE_ALIGNMENT" \
..

RUN make -j "$(getconf _NPROCESSORS_ONLN)"
Expand All @@ -97,7 +101,7 @@

# Simple example of how to properly extract packages for reuse in distroless
# Taken from: https://github.com/GoogleContainerTools/distroless/issues/863
FROM debian:bookworm-slim as deb-extractor

Check warning on line 104 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 104 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/

Expand Down Expand Up @@ -154,7 +158,7 @@

# We want latest at time of build
# hadolint ignore=DL3006
FROM gcr.io/distroless/cc-debian12 as production

Check warning on line 161 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 161 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG RELEASE_VERSION
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
LABEL description="Fluent Bit multi-architecture container image" \
Expand Down Expand Up @@ -185,7 +189,7 @@
ENTRYPOINT [ "/fluent-bit/bin/fluent-bit" ]
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]

FROM debian:bookworm-slim as debug

Check warning on line 192 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 192 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG RELEASE_VERSION
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
LABEL description="Fluent Bit multi-architecture debug container image" \
Expand All @@ -203,7 +207,7 @@

COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
ENV DEBIAN_FRONTEND noninteractive

Check warning on line 210 in dockerfiles/Dockerfile

View workflow job for this annotation

GitHub Actions / PR - Buildkit docker build test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# hadolint ignore=DL3008
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \
Expand Down
Loading