File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,19 @@ FROM docker.elastic.co/logstash/logstash${DISTRIBUTION_SUFFIX}:${ELASTIC_STACK_V
4
4
# install and enable password-less sudo for logstash user
5
5
# allows modifying the system inside the container (using the .ci/setup.sh hook)
6
6
USER root
7
+ # use "apt-get" for 7.x and 8.x images based on ubuntu 20 and "microdnf" for 9.x images based on ubi8-minimal
7
8
RUN if [ $(command -v apt-get) ]; then \
8
9
apt-get update -y && apt-get install -y sudo && \
9
10
gpasswd -a logstash sudo; \
10
11
else \
11
- yum install -y sudo && \
12
+ microdnf install -y sudo && \
12
13
usermod -aG wheel logstash; \
13
14
fi
14
15
RUN if [ $(command -v apt-get) ]; then \
15
16
apt-get update -y --fix-missing && \
16
17
apt-get install -y shared-mime-info; \
17
18
else \
18
- yum install -y shared-mime-info; \
19
+ microdnf install -y shared-mime-info; \
19
20
fi
20
21
RUN echo "logstash ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/logstash && \
21
22
chmod 0440 /etc/sudoers.d/logstash
You can’t perform that action at this time.
0 commit comments