confluentinc / cp-docker-images

[DEPRECATED] Docker images for Confluent Platform.
Apache License 2.0
1.14k stars 705 forks source link

Failing to extend the cp-kafka-connect-base:7.0.1 image #913

Closed aidan-melen closed 2 years ago

aidan-melen commented 2 years ago

The error is reproducable in the flagship example on the website (https://docs.confluent.io/platform/current/installation/docker/development.html#create-a-docker-image-containing-c-hub-connectors)

The following Dockerfile will fail to build. Specifically when installing the connectors on version 7.0.1

FROM confluentinc/cp-kafka-connect-base:7.0.1

RUN   confluent-hub install --no-prompt hpgrahsl/kafka-connect-mongodb:1.1.0 \
   && confluent-hub install --no-prompt microsoft/kafka-connect-iothub:0.6 \
   && confluent-hub install --no-prompt wepay/kafka-connect-bigquery:1.1.0

This will fail with the following build logs:

$ docker build . -t kafka-connect-extended
Sending build context to Docker daemon 8.704kB
Step 1 : FROM confluentinc/cp-kafka-connect-base:7.0.1
---> b6dffb7270f5
Step 2 : RUN confluent-hub install --no-prompt hpgrahsl/kafka-connect-mongodb:1.1.0 && confluent-hub install --no-prompt microsoft/kafka-connect-iothub:0.6 && confluent-hub install --no-prompt wepay/kafka-connect-bigquery:1.1.0
---> Running in 7aa0e9977a61
Running in a "--no-prompt" mode 
Implicit acceptance of the license below: 
The Apache License, Version 2.0 
https://www.apache.org/licenses/LICENSE-2.0 
Implicit confirmation of the question: You are about to install 'kafka-connect-mongodb' from Hans-Peter Grahsl, as published on Confluent Hub. 
Downloading component Kafka Connect MongoDB Sink 1.1.0, provided by Hans-Peter Grahsl from Confluent Hub and installing into /usr/share/confluent-hub-components 
Adding installation directory to plugin path in the following files: 
/etc/kafka/connect-distributed.properties 
Unable to update Worker's configuration file /etc/kafka/connect-distributed.properties 
Unable to save to file /etc/kafka/connect-distributed.properties 

Error: Unknown error 
The command '/bin/sh -c confluent-hub install --no-prompt hpgrahsl/kafka-connect-mongodb:1.1.0 && confluent-hub install --no-prompt microsoft/kafka-connect-iothub:0.6 && confluent-hub install --no-prompt wepay/kafka-connect-bigquery:1.1.0' returned a non-zero code: 7

I was able to successfully build with

confluentinc/cp-kafka-connect-base:7.0.0

The issue is with the latest version

confluentinc/cp-kafka-connect-base:7.0.1

aidan-melen commented 2 years ago

moved to https://github.com/confluentinc/kafka-images/issues/130