-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
74 lines (63 loc) · 4.04 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM docker.io/bitnami/minideb:bullseye
ARG TARGETARCH
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
org.opencontainers.image.description="Application packaged by Bitnami" \
org.opencontainers.image.ref.name="1.15.2-debian-11-r14" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/fluentd" \
org.opencontainers.image.title="fluentd" \
org.opencontainers.image.vendor="VMware, Inc." \
org.opencontainers.image.version="1.15.2"
ENV HOME="/" \
OS_ARCH="${TARGETARCH:-amd64}" \
OS_FLAVOUR="debian-11" \
OS_NAME="linux"
LABEL org.opencontainers.image.ref.name="1.15.2-debian-11-r14-1"
ENV PLUGINS fluent-plugin-parser-cri fluent-plugin-multi-format-parser \
fluent-plugin-grok-parser fluent-plugin-kubernetes-parser
COPY prebuildfs /
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install required system packages and dependencies
RUN install_packages ca-certificates curl libc6 libcrypt1 libgcc-s1 libjemalloc-dev libreadline-dev libreadline8 libssl-dev libssl1.1 libstdc++6 libtinfo6 procps sqlite3 zlib1g \
tar wget less rsync
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
if [ ! -f ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
curl -SsLf https://downloads.bitnami.com/files/stacksmith/ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
curl -SsLf https://downloads.bitnami.com/files/stacksmith/ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
fi && \
sha256sum -c ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
tar -zxf ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
rm -rf ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz ruby-3.1.2-153-linux-${OS_ARCH}-debian-11.tar.gz.sha256
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
if [ ! -f gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
fi && \
sha256sum -c gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
tar -zxf gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
rm -rf gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
if [ ! -f fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
curl -SsLf https://downloads.bitnami.com/files/stacksmith/fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
curl -SsLf https://downloads.bitnami.com/files/stacksmith/fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
fi && \
sha256sum -c fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
tar -zxf fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
rm -rf fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz fluentd-1.15.2-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256
RUN apt-get update && apt-get upgrade -y && \
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
RUN chmod g+rwX /opt/bitnami
COPY rootfs /
RUN /opt/bitnami/scripts/fluentd/postunpack.sh
ENV APP_VERSION="1.15.2" \
BITNAMI_APP_NAME="fluentd" \
GEM_HOME="/opt/bitnami/fluentd" \
PATH="/opt/bitnami/ruby/bin:/opt/bitnami/common/bin:/opt/bitnami/fluentd/bin:$PATH"
EXPOSE 5140 24224
WORKDIR /opt/bitnami/fluentd
RUN for PLUGIN in $PLUGINS; do \
echo "=> Install $PLUGIN" && fluent-gem install $PLUGIN --no-document; \
done
RUN useradd fleuntd -u 1001 -d /opt/bitnami/fluentd -N
USER 1001
ENTRYPOINT [ "/opt/bitnami/scripts/fluentd/entrypoint.sh" ]
CMD [ "/opt/bitnami/scripts/fluentd/run.sh" ]