Skip to content

Commit 916cf24

Browse files
authored
support 9.x ubi-minimal based images with microdnf (#69)
1 parent d80dee4 commit 916cf24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ FROM docker.elastic.co/logstash/logstash${DISTRIBUTION_SUFFIX}:${ELASTIC_STACK_V
44
# install and enable password-less sudo for logstash user
55
# allows modifying the system inside the container (using the .ci/setup.sh hook)
66
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
78
RUN if [ $(command -v apt-get) ]; then \
89
apt-get update -y && apt-get install -y sudo && \
910
gpasswd -a logstash sudo; \
1011
else \
11-
yum install -y sudo && \
12+
microdnf install -y sudo && \
1213
usermod -aG wheel logstash; \
1314
fi
1415
RUN if [ $(command -v apt-get) ]; then \
1516
apt-get update -y --fix-missing && \
1617
apt-get install -y shared-mime-info; \
1718
else \
18-
yum install -y shared-mime-info; \
19+
microdnf install -y shared-mime-info; \
1920
fi
2021
RUN echo "logstash ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/logstash && \
2122
chmod 0440 /etc/sudoers.d/logstash

0 commit comments

Comments
 (0)