打包cp-docker-images

1. 获取源码:

git clone https://github.com/confluentinc/cp-docker-images.git
#进入目录
cd cp-docker-images
make build-debian

默认情况下,会报如下错误:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'version' contains an expression but should be a constant. @ line 26, column 14
[FATAL] Non-resolvable parent POM for io.confluent:docker-utils:${confluent.version}: Could not find artifact io.confluent:common:pom:5.3.1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at

修改pom.xml加入如下内容即可:

<repositories>

  <repository>
    <id>confluent</id>
    <url>https://packages.confluent.io/maven/</url>
  </repository>

</repositories>

3. 修改bin/build-debian文件,找到docker build,在其后加入参数--add-host d1i4a15mxbxib1.cloudfront.net:52.84.225.183,否则,会在打包的过程中报错:

Step 34/35 : RUN confluent-hub install --no-prompt confluentinc/kafka-connect-datagen:latest
---> Running in 12312131213
Running in a "--no-prompt" mode 
Implicit acceptance of the license below:  
Apache License 2.0 
https://www.apache.org/licenses/LICENSE-2.0 
Downloading component Kafka Connect Datagen 0.1.1, provided by Confluent, Inc. from Confluent Hub and installing into /usr/share/confluent-hub-components 
java.net.UnknownHostException: d1i4a15mxbxib1.cloudfront.net 

4. 如果下载zulu时报错,可以将zulu换成openjdk,在debian系统上的安装命令为apt-get install openjdk-8-jdk,在centos上的安装命令为yum install -y java-1.8.0-openjdk

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章