-
-
Notifications
You must be signed in to change notification settings - Fork 556
/
kafka_client.dockerfile
28 lines (24 loc) · 1002 Bytes
/
kafka_client.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
FROM alpine:3
# Install Kafka client
ENV KAFKA_VERSION 3.7.0
ENV SCALA_VERSION 2.13
RUN apk add --update --no-cache curl
RUN apk add --no-cache openjdk17-jre bash bind-tools grep
RUN apk add --no-cache -t .build-deps curl ca-certificates jq
RUN mkdir -p /opt
RUN mirror=$(curl --stderr /dev/null https://www.apache.org/dyn/closer.cgi\?as_json\=1 | jq -r '.preferred') \
&& curl -sSL "${mirror}kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz" \
| tar -xzf - -C /opt \
&& mv /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka \
&& adduser -DH -s /sbin/nologin kafka \
&& chown -R kafka: /opt/kafka \
&& rm -rf /tmp/* \
&& apk del --purge .build-deps
ENV PATH "/sbin:/opt/kafka/bin/:$PATH"
# Install Ockam
RUN curl --proto '=https' --tlsv1.2 -sSfL https://install.command.ockam.io | bash -s
ENV PATH "/root/.ockam/bin:$PATH"
# Copy the script that will be used as entrypoint
COPY run_ockam.sh /run_ockam.sh
RUN chmod +x /run_ockam.sh
ENTRYPOINT ["/run_ockam.sh"]