-
Notifications
You must be signed in to change notification settings - Fork 133
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
Init Process for AWS for Fluent Bit on ECS #379
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM public.ecr.aws/amazonlinux/amazonlinux:latest as init-builder | ||
|
||
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | ||
RUN chmod +x /bin/gimme | ||
RUN yum upgrade -y && yum install -y tar gzip git | ||
ENV HOME /home | ||
RUN /bin/gimme 1.17.9 | ||
ENV PATH ${PATH}:/home/.gimme/versions/go1.17.9.linux.arm64/bin:/home/.gimme/versions/go1.17.9.linux.amd64/bin | ||
RUN go version | ||
ENV GO111MODULE on | ||
RUN go env -w GOPROXY=direct | ||
|
||
# Build init process for Fluent Bit | ||
COPY /init/fluent_bit_init_process.go / | ||
COPY /go.mod / | ||
COPY /go.sum / | ||
RUN go mod tidy \ | ||
&& go build fluent_bit_init_process.go | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: extra line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should not run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, I changed it to copy |
||
FROM amazon/aws-for-fluent-bit:latest | ||
|
||
RUN mkdir -p /init | ||
|
||
COPY --from=init-builder /fluent_bit_init_process /init/fluent_bit_init_process | ||
|
||
COPY init/fluent_bit_init_entrypoint.sh /init/fluent_bit_init_entrypoint.sh | ||
RUN chmod +x /init/fluent_bit_init_entrypoint.sh | ||
|
||
# Only last CMD command will be executed, automatically replaces the original entrypoint | ||
CMD /init/fluent_bit_init_entrypoint.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
./init/fluent_bit_init_process | ||
source /init/invoke_fluent_bit.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try not to hardcode the go version since This always need to be upgraded.
Not 100% if it works but can you verify if it's possible to use
to install go?
Official doc: https://github.com/travis-ci/gimme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried switching to the stable version, but this prevents me from setting the
PATH
for the go command in the Dockerfile..Using 1.17.9 is because other Dockerfiles in our repo used this version