File tree 1 file changed +7
-19
lines changed
1 file changed +7
-19
lines changed Original file line number Diff line number Diff line change 1
- # This dockerfile expects Connector jars to have been built under a `connectors` directory
2
- #
3
- FROM alpine as builder
1
+ FROM apache/kafka:latest
4
2
5
- RUN apk update
6
- RUN apk --no-cache add curl
7
-
8
- RUN curl -L "https://downloads.apache.org/kafka/3.4.0/kafka_2.12-3.4.0.tgz" -o kafka.tgz
9
- RUN mkdir /opt/kafka \
10
- && tar -xf kafka.tgz -C /opt/kafka --strip-components=1
11
-
12
- FROM ibmjava:11
3
+ USER root
13
4
14
5
RUN addgroup --gid 5000 --system esgroup && \
15
- adduser --uid 5000 --ingroup esgroup --system esuser
16
-
17
- COPY --chown=esuser:esgroup --from=builder /opt/kafka/bin/ /opt/kafka/bin/
18
- COPY --chown=esuser:esgroup --from=builder /opt/kafka/libs/ /opt/kafka/libs/
19
- COPY --chown=esuser:esgroup --from=builder /opt/kafka/config/ /opt/kafka/config/
20
- RUN mkdir /opt/kafka/logs && chown esuser:esgroup /opt/kafka/logs
6
+ adduser --uid 5000 --ingroup esgroup --system esuser && \
7
+ mkdir -p /opt/kafka/plugins /opt/kafka/logs && \
8
+ chown -R esuser:esgroup /opt/kafka/plugins /opt/kafka/logs
21
9
22
- COPY --chown=esuser:esgroup connectors /opt/connectors
10
+ COPY --chown=esuser:esgroup connectors /opt/kafka/plugins/
23
11
24
12
WORKDIR /opt/kafka
25
13
26
14
EXPOSE 8083
27
15
28
16
USER esuser
29
17
30
- ENTRYPOINT ["./ bin/connect-distributed.sh" , "config/connect-distributed.properties" ]
18
+ ENTRYPOINT ["bin/connect-distributed.sh" , "config/connect-distributed.properties" ]
You can’t perform that action at this time.
0 commit comments