-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathglibc.dockerfile
54 lines (46 loc) · 1.47 KB
/
glibc.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ruby:3.3.6-slim@sha256:e004e45a75508f2c3bd5bbfe6593ba60dff77b755626e270d631bba09e8c7ead
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
tini \
libjemalloc2 \
libxml2 \
libxslt1.1 \
libcurl4; \
ln -s "/usr/lib/$(uname -m)-linux-gnu" /usr/lib/linux-gnu;
COPY Gemfile Gemfile.lock /fluentd/
RUN set -eux; \
buildDeps=" \
make \
gcc \
g++ \
libc-dev \
wget \
bzip2 \
gnupg \
dirmngr \
libxml2-dev \
libxslt1-dev \
"; \
apt-get install -y --no-install-recommends ${buildDeps}; \
bundle install --frozen --no-cache --gemfile=/fluentd/Gemfile; \
gem sources --clear-all; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${buildDeps}; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test;
RUN set -eux; \
groupadd --system --gid 2000 fluent; \
useradd --system --gid fluent --uid 2000 fluent; \
# For log storage (maybe shared with host)
mkdir -p /fluentd/log /fluentd/state; \
# Configuration/plugins path (default: copied from .)
mkdir -p /fluentd/etc /fluentd/plugins; \
chown -R fluent:fluent /fluentd;
COPY fluent.yaml /fluentd/etc/
COPY --chmod=755 entrypoint.sh /bin/
ENV FLUENTD_DISABLE_BUNDLER_INJECTION="1" FLUENTD_CONF="fluent.yaml"
ENV LD_PRELOAD="/usr/lib/linux-gnu/libjemalloc.so.2"
EXPOSE 24224
USER fluent
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
CMD ["fluentd"]