File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
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:4.0.0
4
2
5
- RUN apk update
6
- RUN apk --no-cache add curl
3
+ USER root
7
4
8
- RUN curl -L "https://downloads.apache.org/kafka/3.6.2/kafka_2.12-3.6.2.tgz" -o kafka.tgz
9
- RUN mkdir /opt/kafka \
10
- && tar -xf kafka.tgz -C /opt/kafka --strip-components=1
5
+ RUN addgroup -g 5000 -S esgroup && \
6
+ adduser -u 5000 -S -G esgroup esuser
11
7
12
- FROM ibmjava:11
8
+ RUN mkdir -p /opt/kafka/plugins && \
9
+ chown -R esuser:esgroup /opt/kafka/plugins
13
10
14
- RUN addgroup --gid 5000 --system esgroup && \
15
- adduser --uid 5000 --ingroup esgroup --system esuser
11
+ COPY --chown=esuser:esgroup target/kafka-connect-*-jar-with-dependencies.jar /opt/kafka/plugins/
16
12
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
21
-
22
- COPY --chown=esuser:esgroup target/kafka-connect-*-jar-with-dependencies.jar /opt/connectors/
13
+ RUN mkdir -p /opt/kafka/logs && chown -R esuser:esgroup /opt/kafka/logs
23
14
24
15
WORKDIR /opt/kafka
25
16
You can’t perform that action at this time.
0 commit comments