Skip to content

Commit 827357f

Browse files
author
Julien Ruaux
committed
build: Building the project inside the docker image
1 parent ac6b377 commit 827357f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@ ARG CP_VERSION=7.2.0
22
ARG BASE_PREFIX=confluentinc
33
ARG CONNECT_IMAGE=cp-server-connect
44

5+
FROM docker.io/library/maven:3.8.6-openjdk-18 AS builder
6+
WORKDIR /root/redis-kafka-connect
7+
COPY . /root/redis-kafka-connect
8+
ENV MAVEN_FAST_INSTALL="-DskipTests -Dair.check.skip-all=true -Dmaven.javadoc.skip=true -B -q -T C1"
9+
RUN mvn package $MAVEN_FAST_INSTALL
10+
511
FROM $BASE_PREFIX/$CONNECT_IMAGE:$CP_VERSION
612

13+
COPY --from=builder --chown=trino:trino /root/redis-kafka-connect/target/components/packages/redis-redis-enterprise-kafka-6.*.zip /tmp/redis-redis-enterprise-kafka-6.zip
14+
715
ENV CONNECT_PLUGIN_PATH="/usr/share/java,/usr/share/confluent-hub-components"
816

917
RUN confluent-hub install --no-prompt confluentinc/kafka-connect-datagen:0.5.3
1018

11-
COPY target/components/packages/redis-redis-enterprise-kafka-6.zip /tmp/redis-redis-enterprise-kafka.zip
12-
13-
RUN confluent-hub install --no-prompt /tmp/redis-redis-enterprise-kafka.zip
19+
RUN confluent-hub install --no-prompt /tmp/redis-redis-enterprise-kafka-6.zip

run.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ if lsof -Pi :6379 -sTCP:LISTEN -t >/dev/null ; then
88
fi
99
)
1010

11-
echo "Building the Redis Kafka Connector"
12-
(
13-
./mvnw clean package -DskipTests
14-
mv target/components/packages/redis-redis-enterprise-kafka-6.*.zip target/components/packages/redis-redis-enterprise-kafka-6.zip
15-
)
16-
1711
echo "Starting docker ."
1812
docker-compose up -d --build
1913

0 commit comments

Comments
 (0)