anchor.diff:  <% fluentd_ver = version.split("-").first %>
  +<% is_v1 = fluentd_ver.start_with?('v1') %>
   <% target = (dockerfile.split("/").last.split("-").last) %>
   <% requires_git = %w(graylog syslog).include? target %>
   <% is_alpine = (dockerfile.split("/").last.split("-").first == "alpine") %>
  
positive.code: ENV FLUENTD_OPT=""
  ENV FLUENTD_CONF="fluent.conf"
  
  # jemalloc is memory optimization only available for td-agent
  # td-agent is provided and QA'ed by treasuredata as rpm/deb/.. package
  # -> td-agent (stable) vs fluentd (edge)
  #ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
  
  # Run Fluentd
  CMD ["/fluentd/entrypoint.sh"]
  
negative.code:      && apt-get upgrade -y \
       && apt-get install \
       -y --no-install-recommends \
  <% if is_v1 %>
       $buildDeps libjemalloc1 \
  <% else %>
       $buildDeps \
  <% end %>
       ruby-bundler \
  <% end %>
      && bundle config silence_root_warning true \
  