32 lines
916 B
Docker
32 lines
916 B
Docker
FROM fluent/fluentd:v1.16.2-1.1
|
|
|
|
USER root
|
|
|
|
# The recommendation is to install gems here. But in practice,
|
|
# the `geoip` plugin will fail if done so, because for unknown reasons,
|
|
# it wouldn't be able to find the `geoip2_c` gem, even though that would
|
|
# be installed successfully.
|
|
# The only way to get that plugin working is to use the `--gemfile` flag
|
|
# to have them installed at startup.
|
|
# Hence why we need to blow up this image with a bunch of dev dependencies.
|
|
RUN set -eux; \
|
|
apk add --no-cache --virtual .build-deps \
|
|
binutils \
|
|
autoconf \
|
|
automake \
|
|
gcc \
|
|
geoip-dev \
|
|
gettext \
|
|
libmaxminddb-dev \
|
|
libtool \
|
|
make \
|
|
musl-dev \
|
|
ruby-dev \
|
|
; \
|
|
# fluentd needs this directory when installing Gems
|
|
mkdir /etc/fluentd; \
|
|
chown fluent:fluent /etc/fluentd
|
|
|
|
USER fluent
|
|
|
|
COPY Gemfile /etc/fluentd/Gemfile
|