diff --git a/bin/build-debian b/bin/build-debian index 56a6b40c..cd9de149 100755 --- a/bin/build-debian +++ b/bin/build-debian @@ -30,7 +30,9 @@ for component in ${COMPONENTS} ; do BUILD_ARGS="" fi - for type in "" rpm; do + #TODO: undo this... only building debian images for now + #for type in "" rpm; do + for type in ""; do DOCKER_FILE="debian/${component}/Dockerfile" COMPONENT_NAME=${component} @@ -43,12 +45,13 @@ for component in ${COMPONENTS} ; do fi if [ -a "${DOCKER_FILE}" ]; then - docker build --build-arg KAFKA_VERSION=${KAFKA_VERSION} --build-arg CONFLUENT_PLATFORM_LABEL=${CONFLUENT_PLATFORM_LABEL} --build-arg CONFLUENT_MAJOR_VERSION=${CONFLUENT_MAJOR_VERSION} --build-arg CONFLUENT_MINOR_VERSION=${CONFLUENT_MINOR_VERSION} --build-arg CONFLUENT_PATCH_VERSION=${CONFLUENT_PATCH_VERSION} --build-arg COMMIT_ID=${COMMIT_ID} --build-arg BUILD_NUMBER=${BUILD_NUMBER} ${BUILD_ARGS} -t ${REPOSITORY}/cp-${COMPONENT_NAME}:latest -f ${DOCKER_FILE} debian/${component} || exit 1 + docker buildx build --platform=linux/arm64,linux/amd64 --pull --build-arg KAFKA_VERSION=${KAFKA_VERSION} --build-arg CONFLUENT_PLATFORM_LABEL=${CONFLUENT_PLATFORM_LABEL} --build-arg CONFLUENT_MAJOR_VERSION=${CONFLUENT_MAJOR_VERSION} --build-arg CONFLUENT_MINOR_VERSION=${CONFLUENT_MINOR_VERSION} --build-arg CONFLUENT_PATCH_VERSION=${CONFLUENT_PATCH_VERSION} --build-arg COMMIT_ID=${COMMIT_ID} --build-arg BUILD_NUMBER=${BUILD_NUMBER} ${BUILD_ARGS} --build-arg REPOSITORY=${REPOSITORY} -t ${REPOSITORY}/cp-${COMPONENT_NAME}:latest --push -f ${DOCKER_FILE} debian/${component} || exit 1 - docker tag ${REPOSITORY}/cp-${COMPONENT_NAME}:latest ${REPOSITORY}/cp-${COMPONENT_NAME}:latest || exit 1 - docker tag ${REPOSITORY}/cp-${COMPONENT_NAME}:latest ${REPOSITORY}/cp-${COMPONENT_NAME}:${CONFLUENT_VERSION}${CONFLUENT_MVN_LABEL} || exit 1 - docker tag ${REPOSITORY}/cp-${COMPONENT_NAME}:latest ${REPOSITORY}/cp-${COMPONENT_NAME}:${VERSION} || exit 1 - docker tag ${REPOSITORY}/cp-${COMPONENT_NAME}:latest ${REPOSITORY}/cp-${COMPONENT_NAME}:${COMMIT_ID} || exit 1 + #TODO: Don't want to use docker tag with buildx image, need to work with the manifest, use something like docker manifest cp? + #docker manifest inspect ${REPOSITORY}/cp-${COMPONENT_NAME}:latest + #Take the manifest digests out of the manifest list, then: + #docker manifest create ${REPOSITORY}/cp-${COMPONENT_NAME}:${VERSION} ${REPOSITORY}/cp-${COMPONENT_NAME}@sha256:...1 ${REPOSITORY}/cp-${COMPONENT_NAME}@sha256:...2 ${REPOSITORY}/cp-${COMPONENT_NAME}@sha256:...3 + #docker manifest push ${REPOSITORY}/cp-${COMPONENT_NAME}:${VERSION} fi; done done diff --git a/debian/base/Dockerfile b/debian/base/Dockerfile index b33e1670..5bd96647 100644 --- a/debian/base/Dockerfile +++ b/debian/base/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM debian:jessie +FROM debian:stable ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID @@ -30,7 +30,7 @@ MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true # Python -ENV PYTHON_VERSION="2.7.9-1" +ENV PYTHON_VERSION="2.7.16-1" ENV PYTHON_PIP_VERSION="8.1.2" # Confluent @@ -63,16 +63,12 @@ ENV ZULU_OPENJDK_VERSION="8=8.38.0.13" ENV LANG="C.UTF-8" RUN echo "===> Updating debian ....." \ - # TODO debian jessie has been deprecated and is only ex - && echo "deb http://archive.debian.org/debian/ jessie main" > /etc/apt/sources.list \ - && echo "deb http://security.debian.org jessie/updates main" >> /etc/apt/sources.list \ && apt-get -qq update \ - \ && echo "===> Installing curl wget netcat python...." \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ apt-transport-https \ curl \ - gnupg-curl \ + gnupg \ git \ wget \ netcat \ @@ -82,11 +78,8 @@ RUN echo "===> Updating debian ....." \ && pip install --no-cache-dir --upgrade pip==${PYTHON_PIP_VERSION} \ && pip install --no-cache-dir git+https://github.com/confluentinc/confluent-docker-utils@v0.0.20 \ && apt remove --purge -y git \ - && echo "Installing Zulu OpenJDK ${ZULU_OPENJDK_VERSION}" \ - && apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 0x27BC0C8CB3D81623F59BDADCB1998361219BD9C9 \ - && echo "deb http://repos.azulsystems.com/debian stable main" >> /etc/apt/sources.list.d/zulu.list \ - && apt-get -qq update \ - && apt-get -y install zulu-${ZULU_OPENJDK_VERSION} \ + && echo "Installing OpenJDK" \ + && apt-get -y install openjdk-11-jdk \ && echo "===> Installing Kerberos Patch ..." \ && DEBIAN_FRONTEND=noninteractive apt-get -y install krb5-user \ && rm -rf /var/lib/apt/lists/* \ diff --git a/debian/enterprise-control-center/Dockerfile b/debian/enterprise-control-center/Dockerfile index 1eee7cb5..2e764e03 100644 --- a/debian/enterprise-control-center/Dockerfile +++ b/debian/enterprise-control-center/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for the Confluent Control Center. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/enterprise-control-center/Dockerfile.rpm b/debian/enterprise-control-center/Dockerfile.rpm index 95910aad..262714cb 100644 --- a/debian/enterprise-control-center/Dockerfile.rpm +++ b/debian/enterprise-control-center/Dockerfile.rpm @@ -15,7 +15,8 @@ # Builds a docker image for the Confluent Control Center. -FROM confluentinc/cp-rpm-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-rpm-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/enterprise-kafka/Dockerfile b/debian/enterprise-kafka/Dockerfile index 7267daba..a9ca57de 100644 --- a/debian/enterprise-kafka/Dockerfile +++ b/debian/enterprise-kafka/Dockerfile @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-kafka +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-kafka ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/enterprise-kafka/Dockerfile.rpm b/debian/enterprise-kafka/Dockerfile.rpm index 727d9738..3642a7fc 100644 --- a/debian/enterprise-kafka/Dockerfile.rpm +++ b/debian/enterprise-kafka/Dockerfile.rpm @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-rpm-kafka +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-rpm-kafka ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/enterprise-replicator-executable/Dockerfile b/debian/enterprise-replicator-executable/Dockerfile index 1f2ff37d..68fe7b19 100644 --- a/debian/enterprise-replicator-executable/Dockerfile +++ b/debian/enterprise-replicator-executable/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for Replicator -FROM confluentinc/cp-enterprise-replicator +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-enterprise-replicator MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true diff --git a/debian/enterprise-replicator/Dockerfile b/debian/enterprise-replicator/Dockerfile index 66e554ad..02286e8e 100644 --- a/debian/enterprise-replicator/Dockerfile +++ b/debian/enterprise-replicator/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for Replicator -FROM confluentinc/cp-server-connect-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-server-connect-base MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true diff --git a/debian/kafka-connect-base/Dockerfile b/debian/kafka-connect-base/Dockerfile index 6653d906..14e747d8 100644 --- a/debian/kafka-connect-base/Dockerfile +++ b/debian/kafka-connect-base/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for Kafka Connect -FROM confluentinc/cp-kafka +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-kafka MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true diff --git a/debian/kafka-connect/Dockerfile b/debian/kafka-connect/Dockerfile index e3fb68bd..8e612065 100644 --- a/debian/kafka-connect/Dockerfile +++ b/debian/kafka-connect/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for Kafka Connect -FROM confluentinc/cp-kafka-connect-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-kafka-connect-base MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true diff --git a/debian/kafka-mqtt/Dockerfile b/debian/kafka-mqtt/Dockerfile index 6ce178f7..f3039b23 100644 --- a/debian/kafka-mqtt/Dockerfile +++ b/debian/kafka-mqtt/Dockerfile @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/kafka-rest/Dockerfile b/debian/kafka-rest/Dockerfile index ad859aeb..a47c57cb 100644 --- a/debian/kafka-rest/Dockerfile +++ b/debian/kafka-rest/Dockerfile @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/kafka/Dockerfile b/debian/kafka/Dockerfile index 1ed1ccb4..e3ebad57 100644 --- a/debian/kafka/Dockerfile +++ b/debian/kafka/Dockerfile @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/kafka/Dockerfile.rpm b/debian/kafka/Dockerfile.rpm index 3a3593d7..c702a815 100644 --- a/debian/kafka/Dockerfile.rpm +++ b/debian/kafka/Dockerfile.rpm @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-rpm-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-rpm-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/schema-registry/Dockerfile b/debian/schema-registry/Dockerfile index 0ebeb007..a8e8e803 100644 --- a/debian/schema-registry/Dockerfile +++ b/debian/schema-registry/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for the Confluent Schema Registry. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/server-connect-base/Dockerfile b/debian/server-connect-base/Dockerfile index af5d1227..2c32cfcd 100644 --- a/debian/server-connect-base/Dockerfile +++ b/debian/server-connect-base/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for Kafka Connect -FROM confluentinc/cp-server +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-server MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true diff --git a/debian/server-connect/Dockerfile b/debian/server-connect/Dockerfile index 73602f8d..e3458ca3 100644 --- a/debian/server-connect/Dockerfile +++ b/debian/server-connect/Dockerfile @@ -15,7 +15,8 @@ # Builds a docker image for Kafka Connect -FROM confluentinc/cp-server-connect-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-server-connect-base MAINTAINER partner-support@confluent.io LABEL io.confluent.docker=true diff --git a/debian/server/Dockerfile b/debian/server/Dockerfile index f805bbaf..72b31f22 100644 --- a/debian/server/Dockerfile +++ b/debian/server/Dockerfile @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/server/Dockerfile.rpm b/debian/server/Dockerfile.rpm index aa7aee7b..68cb29d9 100644 --- a/debian/server/Dockerfile.rpm +++ b/debian/server/Dockerfile.rpm @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-rpm-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-rpm-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID diff --git a/debian/zookeeper/Dockerfile b/debian/zookeeper/Dockerfile index 559f6990..d1b43875 100644 --- a/debian/zookeeper/Dockerfile +++ b/debian/zookeeper/Dockerfile @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base EXPOSE 2181 2888 3888 diff --git a/debian/zookeeper/Dockerfile.rpm b/debian/zookeeper/Dockerfile.rpm index 2375ea99..5a8477de 100644 --- a/debian/zookeeper/Dockerfile.rpm +++ b/debian/zookeeper/Dockerfile.rpm @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM confluentinc/cp-rpm-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-rpm-base EXPOSE 2181 2888 3888 diff --git a/pom.xml b/pom.xml index 02c867a6..9c5afc6b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,9 +1,14 @@ - 4.0.0 - + + + confluent + https://packages.confluent.io/maven/ + + io.confluent common diff --git a/tests/images/jmxterm/Dockerfile b/tests/images/jmxterm/Dockerfile index 542736fa..7dcdfa48 100644 --- a/tests/images/jmxterm/Dockerfile +++ b/tests/images/jmxterm/Dockerfile @@ -1,4 +1,5 @@ -FROM confluentinc/cp-base +ARG REPOSITORY=confluentinc +FROM $REPOSITORY/cp-base ARG COMMIT_ID=unknown LABEL io.confluent.docker.git.id=$COMMIT_ID