-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
45 lines (32 loc) · 1.41 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
FROM registry.access.redhat.com/ubi8/ubi as builder
RUN yum update -y && yum install \
git gcc gcc-c++ python3 \
cyrus-sasl-devel make \
tar wget \
cmake diffutils curl-devel -y
COPY ./install-rhoas.sh .
ARG RHOAS_VERSION
RUN RHOAS_CLI_PATH=/opt/rhoas TAG=$RHOAS_VERSION ./install-rhoas.sh
#Using version 1.6 of Kafkacat. Build from master has an issue where it doesn't accept input in producer mode until you hit Ctrl-D.
RUN git clone --depth 1 --branch 1.6.0 https://github.com/edenhill/kafkacat /opt/kafkacat
RUN pushd /opt/kafkacat && ./bootstrap.sh
# ---------------------------------------------------------------------------- #
FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL maintainer="ddoyle@redhat.com"
ENV RHOAS_CLI_PATH="/usr/local/bin/rhoas"
ENV OC_CLI_PATH="/usr/local/bin/oc"
# Install required packages
RUN microdnf install shadow-utils yum jq
# Create the RHOAS user
RUN useradd -ms /bin/bash rhoas
USER rhoas
COPY contrib/oc /usr/local/bin/oc
COPY contrib/odo /usr/local/bin/odo
COPY --from=builder --chown=root:root /opt/rhoas ${RHOAS_CLI_PATH}
COPY scripts /usr/local/bin
USER root
RUN mkdir -p /.config/rhoas && chmod 777 -R /.config/rhoas && echo "{}" > /.config/rhoas/config.json && chmod 777 /.config/rhoas/config.json
RUN mkdir /.kube && chmod 777 /.kube
USER rhoas
COPY --from=builder --chown=root:root /opt/kafkacat/kafkacat /usr/local/bin/kafkacat
ENTRYPOINT ["tail", "-f", "/dev/null"]