Skip to content

Commit 831b83b

Browse files
committed
Dockerfile cleanup
1 parent d50da72 commit 831b83b

File tree

1 file changed

+17
-39
lines changed

1 file changed

+17
-39
lines changed

fluentd/Dockerfile

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,24 @@
1-
FROM registry.ci.openshift.org/ocp/builder:ubi8.ruby.25 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:ubi8.ruby.25
22

33
MAINTAINER OpenShift Development <[email protected]>
44

5-
ARG DATA_VERSION_VALUE=1.6.0
6-
ARG FLUENTD_VERSION_VALUE=1.7.4
7-
ARG HOME_VALUE=/opt/app-root/src
8-
ARG PATH_VALUE=/opt/app-root/src/bin:/opt/app-root/bin
9-
ARG LOGGING_FILE_PATH_VALUE=/var/log/fluentd/fluentd.log
10-
ARG LOGGING_FILE_AGE_VALUE=10
11-
ARG LOGGING_FILE_SIZE_VALUE=1024000
12-
ARG CONTAINER_VALUE=oci
5+
ENV DATA_VERSION=1.6.0 \
6+
FLUENTD_VERSION=1.7.4 \
7+
HOME=/opt/app-root/src \
8+
PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \
9+
LOGGING_FILE_PATH=/var/log/fluentd/fluentd.log \
10+
LOGGING_FILE_AGE=10 \
11+
LOGGING_FILE_SIZE=1024000 \
12+
container=oci
1313

14-
ENV DATA_VERSION=$DATA_VERSION_VALUE \
15-
FLUENTD_VERSION=$FLUENTD_VERSION_VALUE \
16-
HOME=$HOME_VALUE \
17-
PATH=$PATH_VALUE:$PATH \
18-
LOGGING_FILE_PATH=$LOGGING_FILE_PATH_VALUE \
19-
LOGGING_FILE_AGE=$LOGGING_FILE_AGE_VALUE \
20-
LOGGING_FILE_SIZE=$LOGGING_FILE_SIZE_VALUE \
21-
container=$CONTAINER_VALUE
22-
23-
ARG TEST_REPO
24-
#ADD test.repo /etc/yum.repos.d
14+
ARG BUILD_PKGS="make gcc-c++ libffi-devel autoconf automake libtool m4 redhat-rpm-config"
15+
ARG RUNTIME_PKGS="hostname bc iproute"
2516

2617
USER 0
2718

28-
RUN BUILD_PKGS="make gcc-c++ libffi-devel \
29-
autoconf automake libtool m4 \
30-
redhat-rpm-config" && \
31-
RUNTIME_PKGS="hostname \
32-
bc \
33-
iproute" && \
34-
yum install -y $BUILD_PKGS $RUNTIME_PKGS && \
35-
rpm -V $BUILD_PKGS && \
36-
rpm -V $RUNTIME_PKGS && \
37-
yum clean all
38-
39-
# uncomment if you want to try out test rpm builds
40-
#ADD *.rpm /tmp/
41-
#RUN yum -y install /tmp/*.rpm
19+
RUN yum install -y $BUILD_PKGS $RUNTIME_PKGS && \
20+
rpm -V $BUILD_PKGS $RUNTIME_PKGS && \
21+
yum clean all
4222

4323
ADD jemalloc/ ${HOME}/jemalloc/
4424
RUN cd ${HOME}/jemalloc && EXTRA_CFLAGS="$( rpm --eval '%{optflags}' )" ./autogen.sh && \
@@ -56,10 +36,7 @@ ADD install-gems.sh *.patch.sh *.patch ${HOME}/vendored_gem_src/
5636

5737
RUN cd ${HOME}/vendored_gem_src/ && ./install-gems.sh && cd / && rm -rf ${HOME}/vendored_gem_src/
5838

59-
RUN BUILD_PKGS="make gcc-c++ libffi-devel \
60-
autoconf automake libtool m4 \
61-
redhat-rpm-config" && \
62-
yum remove -y $BUILD_PKGS
39+
RUN yum remove -y $BUILD_PKGS
6340

6441
RUN mkdir -p /etc/fluent/plugin
6542
ADD out_syslog_buffered.rb out_syslog.rb out_rawtcp.rb /etc/fluent/plugin/
@@ -71,7 +48,8 @@ ADD lib/fluent-plugin-viaq_data_model/lib/fluent/plugin/*.rb /etc/fluent/plugin/
7148
COPY utils/ /usr/local/bin/
7249

7350
RUN mkdir -p /etc/fluent/configs.d/user && \
74-
chmod 777 /etc/fluent/configs.d/user
51+
chmod 777 /etc/fluent/configs.d/user && \
52+
ln -s /etc/fluent/configs.d/user/fluent.conf /etc/fluent/fluent.conf
7553

7654
WORKDIR ${HOME}
7755
CMD ["sh", "run.sh"]

0 commit comments

Comments
 (0)