mirror of
https://github.com/bitnami/containers.git
synced 2026-02-26 15:57:21 +08:00
1.2.2-ol-7-r3 release
Movinf config file creation to entrypoint
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
FROM bitnami/ruby:2.5-ol-7 as buildenv
|
||||
|
||||
RUN install_packages ca-certificates glibc nss-softokn-freebl wget
|
||||
RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/fluentd-1.2.2-0-linux-x86_64-ol-7.tar.gz && \
|
||||
echo "978bb6f6cd7fbe9e2eb815b457a30ca679cc2a0db3138b82b86642b4855e214e /tmp/bitnami/pkg/cache/fluentd-1.2.2-0-linux-x86_64-ol-7.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf /tmp/bitnami/pkg/cache/fluentd-1.2.2-0-linux-x86_64-ol-7.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
|
||||
rm -rf /tmp/bitnami/pkg/cache/fluentd-1.2.2-0-linux-x86_64-ol-7.tar.gz
|
||||
RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/fluentd-1.2.2-1-linux-x86_64-ol-7.tar.gz && \
|
||||
echo "029603a60845402c333a066afcc4c76150b8060736ce7f6079521219e850a27f /tmp/bitnami/pkg/cache/fluentd-1.2.2-1-linux-x86_64-ol-7.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf /tmp/bitnami/pkg/cache/fluentd-1.2.2-1-linux-x86_64-ol-7.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
|
||||
rm -rf /tmp/bitnami/pkg/cache/fluentd-1.2.2-1-linux-x86_64-ol-7.tar.gz
|
||||
|
||||
##################
|
||||
|
||||
@@ -13,15 +13,17 @@ LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
COPY --from=buildenv /opt/bitnami/fluentd /opt/bitnami/fluentd
|
||||
ENV BITNAMI_APP_NAME="fluentd" \
|
||||
BITNAMI_IMAGE_VERSION="1.2.2-ol-7-r2" \
|
||||
BITNAMI_IMAGE_VERSION="1.2.2-ol-7-r3" \
|
||||
GEM_HOME="/opt/bitnami/fluentd" \
|
||||
PATH="/opt/bitnami/fluentd/bin:$PATH"
|
||||
|
||||
RUN install_packages ca-certificates libjemalloc-dev
|
||||
RUN chmod g+rwX /opt/bitnami/fluentd/logs
|
||||
RUN chmod g+rwX /opt/bitnami/fluentd/conf /opt/bitnami/fluentd/logs
|
||||
|
||||
EXPOSE 24224 5140
|
||||
|
||||
COPY rootfs /
|
||||
WORKDIR /opt/bitnami/fluentd
|
||||
USER 1001
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["fluentd","-c","/opt/bitnami/fluentd/conf/fluentd.conf","-p","/opt/bitnami/fluentd/plugins"]
|
||||
|
||||
49
bitnami/fluentd/1/ol-7/rootfs/entrypoint.sh
Executable file
49
bitnami/fluentd/1/ol-7/rootfs/entrypoint.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONF_FILE='/opt/bitnami/fluentd/conf/fluentd.conf';
|
||||
|
||||
if [ ! -e ${CONF_FILE} ]; then
|
||||
echo "==> Writing config file..."
|
||||
cat > ${CONF_FILE} << EOF
|
||||
<source>
|
||||
@type forward
|
||||
@id input1
|
||||
@label @mainstream
|
||||
port 24224
|
||||
</source>
|
||||
|
||||
<filter **>
|
||||
@type stdout
|
||||
</filter>
|
||||
|
||||
<label @mainstream>
|
||||
<match docker.**>
|
||||
@type file
|
||||
@id output_docker1
|
||||
path /opt/bitnami/fluentd/logs/docker.*.log
|
||||
symlink_path /opt/bitnami/fluentd/logs/docker.log
|
||||
append true
|
||||
time_slice_format %Y%m%d
|
||||
time_slice_wait 1m
|
||||
time_format %Y%m%dT%H%M%S%z
|
||||
</match>
|
||||
<match **>
|
||||
@type file
|
||||
@id output1
|
||||
path /opt/bitnami/fluentd/logs/data.*.log
|
||||
symlink_path /opt/bitnami/fluentd/logs/data.log
|
||||
append true
|
||||
time_slice_format %Y%m%d
|
||||
time_slice_wait 10m
|
||||
time_format %Y%m%dT%H%M%S%z
|
||||
</match>
|
||||
</label>
|
||||
|
||||
# Include config files in the ./config.d directory
|
||||
@include config.d/*.conf
|
||||
EOF
|
||||
else
|
||||
echo "==> Detected config file. It would be used instead of creating one."
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
@@ -22,7 +22,7 @@ $ docker run --name fluentd bitnami/fluentd:latest
|
||||
# Supported tags and respective `Dockerfile` links
|
||||
|
||||
* [`1`, `1.2.2-r13`, `latest` (1/Dockerfile)](https://github.com/bitnami/bitnami-docker-fluentd/blob/1.2.2-r13/1/Dockerfile)
|
||||
* [`1-ol-7`, `1.2.2-ol-7-r2` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-fluentd/blob/1.2.2-ol-7-r2/1/ol-7/Dockerfile)
|
||||
* [`1-ol-7`, `1.2.2-ol-7-r3` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-fluentd/blob/1.2.2-ol-7-r3/1/ol-7/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/fluentd GitHub repo](https://github.com/bitnami/bitnami-docker-fluentd).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user