-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile
29 lines (18 loc) · 892 Bytes
/
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
FROM alpine as builder
RUN apk update
RUN apk --no-cache add curl
RUN curl -L "https://downloads.apache.org/kafka/3.4.1/kafka_2.12-3.4.1.tgz" -o kafka.tgz
RUN mkdir /opt/kafka \
&& tar -xf kafka.tgz -C /opt/kafka --strip-components=1
FROM ibmjava:11
RUN addgroup --gid 5000 --system esgroup && \
adduser --uid 5000 --ingroup esgroup --system esuser
COPY --chown=esuser:esgroup --from=builder /opt/kafka/bin/ /opt/kafka/bin/
COPY --chown=esuser:esgroup --from=builder /opt/kafka/libs/ /opt/kafka/libs/
COPY --chown=esuser:esgroup --from=builder /opt/kafka/config/ /opt/kafka/config/
RUN mkdir /opt/kafka/logs && chown esuser:esgroup /opt/kafka/logs
COPY --chown=esuser:esgroup target/kafka-connect-*-jar-with-dependencies.jar /opt/kafka/plugins/
WORKDIR /opt/kafka
EXPOSE 8083
USER esuser
ENTRYPOINT ["./bin/connect-distributed.sh", "config/connect-distributed.properties"]