mirror of
https://github.com/valitydev/clickhouse-sink-connector.git
synced 2024-11-06 18:45:27 +00:00
build images from sources
This commit is contained in:
parent
cd9a12cfd2
commit
a9d8a18b33
@ -2,5 +2,19 @@ FROM debezium/connect-base:1.9.2.Final
|
||||
|
||||
LABEL maintainer="Altinity"
|
||||
|
||||
USER root:root
|
||||
|
||||
# Copy sink-connector
|
||||
COPY target/*.jar /kafka/connect/clickhouse-kafka-sink-connector/
|
||||
|
||||
# Copy libs
|
||||
COPY deploy/libs/* /kafka/connect/clickhouse-kafka-sink-connector/
|
||||
COPY target/*.jar /kafka/connect/clickhouse-kafka-sink-connector/
|
||||
|
||||
# Copy apicurio
|
||||
RUN 'curl' '-L' '--output' '/kafka/connect/clickhouse-kafka-sink-connector/apicurio.tgz' 'https://repo1.maven.org/maven2/io/apicurio/apicurio-registry-distro-connect-converter/2.1.5.Final/apicurio-registry-distro-connect-converter-2.1.5.Final.tar.gz' \
|
||||
&& 'tar' 'xvfz' '/kafka/connect/clickhouse-kafka-sink-connector/apicurio.tgz' '-C' '/kafka/connect/clickhouse-kafka-sink-connector' \
|
||||
&& 'rm' '-vf' '/kafka/connect/clickhouse-kafka-sink-connector/apicurio.tgz/apicurio.tgz'
|
||||
|
||||
RUN chown -R kafka:kafka /kafka/connect/
|
||||
|
||||
USER kafka
|
||||
|
@ -15,10 +15,3 @@ RUN 'mkdir' '-p' '/opt/kafka/plugins/debezium-mysql-connector/3542976d' \
|
||||
&& 'rm' '-vf' '/opt/kafka/plugins/debezium-mysql-connector/3542976d.tgz'
|
||||
|
||||
USER 1001
|
||||
|
||||
#ADD https://repo1.maven.org/maven2/io/debezium/debezium-connector-mysql/1.9.2.Final/debezium-connector-mysql-1.9.2.Final-plugin.tar.gz /opt/kafka/plugins/debezium/
|
||||
#RUN chmod 666 /opt/kafka/plugins/debezium/*
|
||||
#ADD https://repo1.maven.org/maven2/io/debezium/debezium-connector-mysql/1.9.2.Final/debezium-connector-mysql-1.9.2.Final-plugin.tar.gz /opt/kafka/plugins/
|
||||
#RUN chmod 666 /opt/kafka/plugins/*
|
||||
#
|
||||
#ADD deploy/apicurio-registry-distro-connect-converter/*.jar /opt/kafka/libs/
|
||||
|
@ -4,22 +4,16 @@ LABEL maintainer="Altinity"
|
||||
|
||||
USER root:root
|
||||
|
||||
RUN 'mkdir' '-p' '/opt/kafka/plugins/clickhouse-sink-connector/280d4c6e' \
|
||||
&& 'curl' '-L' '--output' '/opt/kafka/plugins/clickhouse-sink-connector/280d4c6e.tgz' 'https://github.com/Altinity/clickhouse-sink-connector/raw/main/deploy/k8s/artefacts/sink.tgz' \
|
||||
&& 'tar' 'xvfz' '/opt/kafka/plugins/clickhouse-sink-connector/280d4c6e.tgz' '-C' '/opt/kafka/plugins/clickhouse-sink-connector/280d4c6e' \
|
||||
&& 'rm' '-vf' '/opt/kafka/plugins/clickhouse-sink-connector/280d4c6e.tgz'
|
||||
# Copy sink-connector
|
||||
COPY target/*.jar /opt/kafka/plugins/clickhouse-sink-connector/280d4c6e/
|
||||
|
||||
# Copy libs
|
||||
COPY deploy/libs/* /opt/kafka/plugins/clickhouse-sink-connector/2824cdcf/
|
||||
|
||||
# Copy apicurio
|
||||
RUN 'mkdir' '-p' '/opt/kafka/plugins/clickhouse-sink-connector/3542976d' \
|
||||
&& 'curl' '-L' '--output' '/opt/kafka/plugins/clickhouse-sink-connector/3542976d.tgz' 'https://repo1.maven.org/maven2/io/apicurio/apicurio-registry-distro-connect-converter/2.1.5.Final/apicurio-registry-distro-connect-converter-2.1.5.Final.tar.gz' \
|
||||
&& 'tar' 'xvfz' '/opt/kafka/plugins/clickhouse-sink-connector/3542976d.tgz' '-C' '/opt/kafka/plugins/clickhouse-sink-connector/3542976d' \
|
||||
&& 'rm' '-vf' '/opt/kafka/plugins/clickhouse-sink-connector/3542976d.tgz'
|
||||
|
||||
RUN 'mkdir' '-p' '/opt/kafka/plugins/clickhouse-sink-connector/2824cdcf' \
|
||||
&& 'curl' '-L' '--output' '/opt/kafka/plugins/clickhouse-sink-connector/2824cdcf.tgz' 'https://github.com/Altinity/clickhouse-sink-connector/raw/main/deploy/k8s/artefacts/libs.tgz' \
|
||||
&& 'tar' 'xvfz' '/opt/kafka/plugins/clickhouse-sink-connector/2824cdcf.tgz' '-C' '/opt/kafka/plugins/clickhouse-sink-connector/2824cdcf' \
|
||||
&& 'rm' '-vf' '/opt/kafka/plugins/clickhouse-sink-connector/2824cdcf.tgz'
|
||||
|
||||
USER 1001
|
||||
|
||||
#COPY deploy/libs/* /opt/kafka/plugins/clickhouse-kafka-sink-connector/
|
||||
#COPY target/*.jar /opt/kafka/plugins/clickhouse-kafka-sink-connector/
|
||||
|
@ -9,12 +9,15 @@ SRC_ROOT="$(realpath "${CUR_DIR}/..")"
|
||||
|
||||
# Externally configurable build-dependent options
|
||||
TAG="${TAG:-latest}"
|
||||
DOCKER_IMAGE="altinity/clickhouse-kafka-sink-connector:${TAG}"
|
||||
DOCKER_IMAGE="altinity/clickhouse-kafka-sink-connector-debezium-base:${TAG}"
|
||||
|
||||
# Externally configurable build-dependent options
|
||||
DOCKERFILE_DIR="${SRC_ROOT}/docker"
|
||||
DOCKERFILE="${DOCKERFILE_DIR}/Dockerfile-debezium-base"
|
||||
|
||||
echo "***************"
|
||||
echo "* Build image *"
|
||||
echo "***************"
|
||||
DOCKER_CMD="docker build -t ${DOCKER_IMAGE} -f ${DOCKERFILE} ${SRC_ROOT}"
|
||||
|
||||
if ${DOCKER_CMD}; then
|
||||
|
@ -15,24 +15,11 @@ DOCKER_IMAGE="altinity/debezium-mysql-source-connector:${TAG}"
|
||||
DOCKERFILE_DIR="${SRC_ROOT}/docker"
|
||||
DOCKERFILE="${DOCKERFILE_DIR}/Dockerfile-strimzi-debezium"
|
||||
|
||||
#echo "*********************"
|
||||
#echo "* Download apicurio *"
|
||||
#echo "*********************"
|
||||
#VERSION="2.1.5.Final"
|
||||
#REMOTE_FILE="https://repo1.maven.org/maven2/io/apicurio/apicurio-registry-distro-connect-converter/$VERSION/apicurio-registry-distro-connect-converter-$VERSION.tar.gz"
|
||||
#FILE=/tmp/apicurio-registry-distro-connect-converter.tar.gz
|
||||
#wget $REMOTE_FILE -O $FILE
|
||||
#EXTRACT_DIR=$SRC_ROOT/deploy/apicurio-registry-distro-connect-converter
|
||||
#mkdir -p $EXTRACT_DIR
|
||||
#tar xvfz $FILE --directory $EXTRACT_DIR
|
||||
#trap "echo 'Delete files' && rm -rf $FILE $EXTRACT_DIR" EXIT
|
||||
|
||||
echo "***************"
|
||||
echo "* Build image *"
|
||||
echo "***************"
|
||||
DOCKER_CMD="docker build -t ${DOCKER_IMAGE} -f ${DOCKERFILE} ${SRC_ROOT}"
|
||||
|
||||
|
||||
if ${DOCKER_CMD}; then
|
||||
echo "ALL DONE"
|
||||
else
|
||||
|
@ -15,6 +15,9 @@ DOCKER_IMAGE="altinity/clickhouse-kafka-sink-connector:${TAG}"
|
||||
DOCKERFILE_DIR="${SRC_ROOT}/docker"
|
||||
DOCKERFILE="${DOCKERFILE_DIR}/Dockerfile-strimzi-sink"
|
||||
|
||||
echo "***************"
|
||||
echo "* Build image *"
|
||||
echo "***************"
|
||||
DOCKER_CMD="docker build -t ${DOCKER_IMAGE} -f ${DOCKERFILE} ${SRC_ROOT}"
|
||||
|
||||
if ${DOCKER_CMD}; then
|
||||
|
@ -7,4 +7,4 @@ set -e
|
||||
CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||
SRC_ROOT="$(realpath "${CUR_DIR}/..")"
|
||||
|
||||
{ cd "${SRC_ROOT}"; mvn clean package; } && "${CUR_DIR}"/build.sh
|
||||
{ cd "${SRC_ROOT}"; mvn clean package; } && "${CUR_DIR}"/build-debezium-base.sh
|
||||
|
Loading…
Reference in New Issue
Block a user