Skip to content

Commit

Permalink
Upgrade fluentd base image, refactor docker file to pull steps into b…
Browse files Browse the repository at this point in the history
…uilder image, remove dependencies that are not needed. (#817)
  • Loading branch information
frankreno authored Aug 4, 2020
1 parent 16642cf commit 72a38fc
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 1,470 deletions.
29 changes: 13 additions & 16 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fluent/fluentd:v1.8.1-debian-1.0 AS builder
FROM fluent/fluentd:v1.11.1-debian-1.0 AS builder

# Use root account to use apt
USER root
Expand Down Expand Up @@ -38,23 +38,11 @@ RUN gem install --local fluent-plugin-prometheus-format \
&& gem install --local fluent-plugin-enhance-k8s-metadata \
&& gem install --local fluent-plugin-datapoint \
&& gem install --local fluent-plugin-protobuf \
&& gem install --local fluent-plugin-events \
&& gem install --local fluent-plugin-zipkin

# Start with fresh image
FROM fluent/fluentd:v1.8.1-debian-1.0

# Use root account to use apt
USER root
&& gem install --local fluent-plugin-events

# Run dependencies
RUN runDeps="sudo libsnappy-dev" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $runDeps \
&& apt-get install -y gnupg \
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get install -y jq \
&& apt-get install -y wget \
&& apt-get install -y unzip

# Install Terraform
Expand All @@ -67,15 +55,24 @@ RUN mkdir /tmp/terraform && \
chmod +x /bin/terraform && \
rm -rf /tmp/terraform

# Start with fresh image
FROM fluent/fluentd:v1.11.1-debian-1.0

USER root

RUN apt-get update \
&& apt-get install -y --no-install-recommends libsnappy-dev

# Create directory for terraform configuration
RUN mkdir -p /terraform && \
chown -R fluent /terraform

COPY --from=builder /bin/terraform /bin/terraform
COPY --from=builder /usr/local/bundle /usr/local/bundle
COPY ./fluent.conf /fluentd/etc/
COPY ./entrypoint.sh /bin/

# Allow installing gems by fluent user
RUN chown fluent /usr/local/bundle/*

USER fluent
USER fluent
53 changes: 0 additions & 53 deletions deploy/helm/sumologic/conf/traces/traces.conf

This file was deleted.

27 changes: 0 additions & 27 deletions deploy/helm/sumologic/conf/traces/traces.otelcol.conf.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions fluent-plugin-zipkin/Gemfile

This file was deleted.

25 changes: 0 additions & 25 deletions fluent-plugin-zipkin/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions fluent-plugin-zipkin/Rakefile

This file was deleted.

31 changes: 0 additions & 31 deletions fluent-plugin-zipkin/fluent-plugin-zipkin.gemspec

This file was deleted.

32 changes: 0 additions & 32 deletions fluent-plugin-zipkin/lib/fluent/plugin/filter_counter.rb

This file was deleted.

Loading

0 comments on commit 72a38fc

Please sign in to comment.