From ccdafd5c8d05186fea2a9224faf8d56fe9aedc20 Mon Sep 17 00:00:00 2001 From: sscaling Date: Sat, 10 Nov 2018 09:51:08 +0000 Subject: [PATCH 01/43] Kafka 2.0.1, glibc 2.28-r0 (#421) --- .travis.yml | 4 ++-- CHANGELOG.md | 6 ++++++ Dockerfile | 8 ++++---- README.md | 6 ++---- test/Readme.md | 4 ---- test/docker-compose.yml | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 511b7ff2..20b95227 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.11-2.0.0" + - LATEST="2.11-2.0.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -26,7 +26,7 @@ matrix: - scala: 2.11 env: KAFKA_VERSION=1.1.1 - scala: 2.11 - env: KAFKA_VERSION=2.0.0 + env: KAFKA_VERSION=2.0.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 913dfead..640a8d29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +10-Nov-2018 +----------- + +- Update to Kafka `2.0.0` -> `2.0.1`. +- Update glibc to `2.28-r0` + 29-Jun-2018 ----------- diff --git a/Dockerfile b/Dockerfile index 17f48477..2ad6fa4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM openjdk:8u171-jre-alpine -ARG kafka_version=2.0.0 -ARG scala_version=2.12 -ARG glibc_version=2.27-r0 +ARG kafka_version=2.0.1 +ARG scala_version=2.11 +ARG glibc_version=2.28-r0 ARG vcs_ref=unspecified ARG build_date=unspecified @@ -13,7 +13,7 @@ LABEL org.label-schema.name="kafka" \ org.label-schema.vcs-ref="${vcs_ref}" \ org.label-schema.version="${scala_version}_${kafka_version}" \ org.label-schema.schema-version="1.0" \ - maintainer="wurstmeister" + maintainer="wurstmeister" ENV KAFKA_VERSION=$kafka_version \ SCALA_VERSION=$scala_version \ diff --git a/README.md b/README.md index f0a61f39..3e29e8ac 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.11-2.0.0` +- `2.11-2.0.1` - `2.11-1.1.1` - `2.11-1.0.2` - `2.11-0.11.0.3` @@ -31,8 +31,6 @@ Everytime the image is updated, all tags will be pushed with the latest updates. ## Announcements * **28-May-2018** - New docker image tag format - see Readme. -* **03-Apr-2018** - *BREAKING* - `KAFKA_ADVERTISED_PROTOCOL_NAME` and `KAFKA_PROTOCOL_NAME` removed. Please update to canonical kafka settings. -* **03-Apr-2018** - *BREAKING* - `KAFKA_ZOOKEEPER_CONNECT` is now a mandatory environment var. --- @@ -86,7 +84,7 @@ Here is an example snippet from ```docker-compose.yml```: environment: KAFKA_CREATE_TOPICS: "Topic1:1:3,Topic2:1:1:compact" -```Topic 1``` will have 1 partition and 3 replicas, ```Topic 2``` will have 1 partition, 1 replica and a `cleanup.policy` set to `compact`. +```Topic 1``` will have 1 partition and 3 replicas, ```Topic 2``` will have 1 partition, 1 replica and a `cleanup.policy` set to `compact`. Also, [Topic compaction does not work](https://github.com/wurstmeister/kafka-docker/wiki#topic-compaction-does-not-work) If you wish to use multi-line YAML or some other delimiter between your topic definitions, override the default `,` separator by specifying the `KAFKA_CREATE_TOPICS_SEPARATOR` environment variable. diff --git a/test/Readme.md b/test/Readme.md index 6a25a87c..d6c3bc3d 100644 --- a/test/Readme.md +++ b/test/Readme.md @@ -18,16 +18,12 @@ Run selected tests ### Kafka -These tests can be run without Zookeeper or Kafka running. - ``` docker-compose run --rm kafkatest ``` ### Kafkacat -These tests require zookeeper and kafka to be running - ``` BROKER_LIST=$(./internal-broker-list.sh) [KAFKA_VERSION=] docker-compose run --rm kafkacattest ``` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 2192ff6f..12da15f6 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -35,7 +35,7 @@ services: image: confluentinc/cp-kafkacat environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.0.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.0.1} volumes: - .:/tests working_dir: /tests From 3fdf701bba173c96fd022ac0c56ba01047d8d4cf Mon Sep 17 00:00:00 2001 From: sscaling Date: Sat, 10 Nov 2018 10:16:03 +0000 Subject: [PATCH 02/43] openjdk-8u181 base image (#422) --- CHANGELOG.md | 1 + Dockerfile | 2 +- README.md | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 640a8d29..cf17b6bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Kafka features are not tied to a specific kafka-docker version (ideally all chan - Update to Kafka `2.0.0` -> `2.0.1`. - Update glibc to `2.28-r0` +- Update base image to openjdk:8u181-jre-alpine 29-Jun-2018 ----------- diff --git a/Dockerfile b/Dockerfile index 2ad6fa4a..c8e486a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8u171-jre-alpine +FROM openjdk:8u181-jre-alpine ARG kafka_version=2.0.1 ARG scala_version=2.11 diff --git a/README.md b/README.md index 3e29e8ac..90478270 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Everytime the image is updated, all tags will be pushed with the latest updates. ## Announcements +* **11-Nov-2018** - Update base image to openjdk 181 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u181-relnotes-4479407.html)). Please force pull to get these latest updates - including security patches etc. * **28-May-2018** - New docker image tag format - see Readme. --- @@ -84,7 +85,7 @@ Here is an example snippet from ```docker-compose.yml```: environment: KAFKA_CREATE_TOPICS: "Topic1:1:3,Topic2:1:1:compact" -```Topic 1``` will have 1 partition and 3 replicas, ```Topic 2``` will have 1 partition, 1 replica and a `cleanup.policy` set to `compact`. Also, [Topic compaction does not work](https://github.com/wurstmeister/kafka-docker/wiki#topic-compaction-does-not-work) +```Topic 1``` will have 1 partition and 3 replicas, ```Topic 2``` will have 1 partition, 1 replica and a `cleanup.policy` set to `compact`. Also, see FAQ: [Topic compaction does not work](https://github.com/wurstmeister/kafka-docker/wiki#topic-compaction-does-not-work) If you wish to use multi-line YAML or some other delimiter between your topic definitions, override the default `,` separator by specifying the `KAFKA_CREATE_TOPICS_SEPARATOR` environment variable. From f6b3e383903402c7ca0ec1e615298ded9d256595 Mon Sep 17 00:00:00 2001 From: sscaling Date: Thu, 15 Nov 2018 10:13:38 +0000 Subject: [PATCH 03/43] #363: Add link to release process wiki Fixes #363 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 90478270..30375aba 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,10 @@ Older compose files using the short-version of port mapping may encounter Kafka See the included sample compose file ```docker-compose-swarm.yml``` +## Release process + +See the [wiki](https://github.com/wurstmeister/kafka-docker/wiki/ReleaseProcess) for information on adding or updating versions to release to Dockerhub. + ## Tutorial [http://wurstmeister.github.io/kafka-docker/](http://wurstmeister.github.io/kafka-docker/) From 84b3e08dd798bf1fdd0a04a882f322aad31946d6 Mon Sep 17 00:00:00 2001 From: Kyle Boyle Date: Thu, 22 Nov 2018 04:50:11 -0400 Subject: [PATCH 04/43] update to newest kafka version 2.1.0 (#428) --- .travis.yml | 6 ++++-- CHANGELOG.md | 6 ++++++ Dockerfile | 4 ++-- README.md | 3 ++- test/docker-compose.yml | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 20b95227..15ab1352 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.11-2.0.1" + - LATEST="2.12-2.1.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -25,8 +25,10 @@ matrix: env: KAFKA_VERSION=1.0.2 - scala: 2.11 env: KAFKA_VERSION=1.1.1 - - scala: 2.11 + - scala: 2.12 env: KAFKA_VERSION=2.0.1 + - scala: 2.12 + env: KAFKA_VERSION=2.1.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index cf17b6bf..fd9e3a1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +21-Nov-2018 +----------- + +- Update to latest Kafka: `2.1.0` +- Set scala version for Kafka `2.1.0` and `2.0.1` to recommended `2.12` + 10-Nov-2018 ----------- diff --git a/Dockerfile b/Dockerfile index c8e486a6..ecb9bdf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM openjdk:8u181-jre-alpine -ARG kafka_version=2.0.1 -ARG scala_version=2.11 +ARG kafka_version=2.1.0 +ARG scala_version=2.12 ARG glibc_version=2.28-r0 ARG vcs_ref=unspecified ARG build_date=unspecified diff --git a/README.md b/README.md index 30375aba..57131dd9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.11-2.0.1` +- `2.12-2.1.0` +- `2.12-2.0.1` - `2.11-1.1.1` - `2.11-1.0.2` - `2.11-0.11.0.3` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 12da15f6..baf0f0bc 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -35,7 +35,7 @@ services: image: confluentinc/cp-kafkacat environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.0.1} + - KAFKA_VERSION=${KAFKA_VERSION-2.1.0} volumes: - .:/tests working_dir: /tests From e4dd013a73c3b7d4d2851ac472caa66e6d18447d Mon Sep 17 00:00:00 2001 From: sscaling Date: Thu, 24 Jan 2019 18:20:30 +0000 Subject: [PATCH 05/43] Fix kafkacat to version 5.0.0 image (#452) It appears the -e flag behaves differently on more recent (latest) versions, so needs further investigation --- test/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/docker-compose.yml b/test/docker-compose.yml index baf0f0bc..afe31e82 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -32,7 +32,7 @@ services: - "*/*.kafka.sh" kafkacattest: - image: confluentinc/cp-kafkacat + image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - KAFKA_VERSION=${KAFKA_VERSION-2.1.0} From 43cc85be7098cb038d910edd329617f4af2f511c Mon Sep 17 00:00:00 2001 From: sscaling Date: Sat, 2 Feb 2019 13:43:52 +0000 Subject: [PATCH 06/43] OpenJDK 8u191 (#455) --- Dockerfile | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ecb9bdf9..561f0d7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8u181-jre-alpine +FROM openjdk:8u191-jre-alpine ARG kafka_version=2.1.0 ARG scala_version=2.12 diff --git a/README.md b/README.md index 57131dd9..ef212313 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Everytime the image is updated, all tags will be pushed with the latest updates. ## Announcements +* **01-Feb-2019** - Update base image to openjdk 191 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u191-relnotes-5032181.html)). Please force pull to get these latest updates - including security patches etc. * **11-Nov-2018** - Update base image to openjdk 181 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u181-relnotes-4479407.html)). Please force pull to get these latest updates - including security patches etc. * **28-May-2018** - New docker image tag format - see Readme. From f83cf4b4b12615e584f2da2f6e6f7845ad8b5e85 Mon Sep 17 00:00:00 2001 From: Angelo Parchitelli Date: Wed, 6 Feb 2019 17:45:29 +0100 Subject: [PATCH 07/43] Don't create /opt (#458) This has recently been added to the openJDK jre 8u191 base image Fixes #457 --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 561f0d7c..24fe6fa8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,6 @@ ENV PATH=${PATH}:${KAFKA_HOME}/bin COPY download-kafka.sh start-kafka.sh broker-list.sh create-topics.sh versions.sh /tmp/ RUN apk add --no-cache bash curl jq docker \ - && mkdir /opt \ && chmod a+x /tmp/*.sh \ && mv /tmp/start-kafka.sh /tmp/broker-list.sh /tmp/create-topics.sh /tmp/versions.sh /usr/bin \ && sync && /tmp/download-kafka.sh \ From cb59d585653c8516a9ce0dafbb200726b414ed04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrik=20J=C3=B8rgensen?= <34344666+akkerdakker@users.noreply.github.com> Date: Thu, 21 Feb 2019 15:55:03 +0100 Subject: [PATCH 08/43] kafka-2.1.1, glibc-2.29-r0 (#464) --- .travis.yml | 4 ++-- CHANGELOG.md | 10 ++++++++-- Dockerfile | 4 ++-- README.md | 2 +- test/docker-compose.yml | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15ab1352..9f63f460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.1.0" + - LATEST="2.12-2.1.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -28,7 +28,7 @@ matrix: - scala: 2.12 env: KAFKA_VERSION=2.0.1 - scala: 2.12 - env: KAFKA_VERSION=2.1.0 + env: KAFKA_VERSION=2.1.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index fd9e3a1a..568a7e50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,17 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +21-Feb-2019 +----------- + +- Update to latest Kafka: `2.1.1` +- Update glibc to `2.29-r0` + 21-Nov-2018 ----------- -- Update to latest Kafka: `2.1.0` -- Set scala version for Kafka `2.1.0` and `2.0.1` to recommended `2.12` +- Update to latest Kafka: `2.1.0` +- Set scala version for Kafka `2.1.0` and `2.0.1` to recommended `2.12` 10-Nov-2018 ----------- diff --git a/Dockerfile b/Dockerfile index 24fe6fa8..e73e23d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM openjdk:8u191-jre-alpine -ARG kafka_version=2.1.0 +ARG kafka_version=2.1.1 ARG scala_version=2.12 -ARG glibc_version=2.28-r0 +ARG glibc_version=2.29-r0 ARG vcs_ref=unspecified ARG build_date=unspecified diff --git a/README.md b/README.md index ef212313..79e27f8c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.12-2.1.0` +- `2.12-2.1.1` - `2.12-2.0.1` - `2.11-1.1.1` - `2.11-1.0.2` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index afe31e82..4006b4d0 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -35,7 +35,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.1.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.1.1} volumes: - .:/tests working_dir: /tests From c4356094e1a43dca7e6999c33a832ea94bcfca9d Mon Sep 17 00:00:00 2001 From: Mark Rebuck Date: Wed, 13 Mar 2019 06:28:55 -0400 Subject: [PATCH 09/43] Fix minor typo in README.md (#470) Missing and ending doublequote character `HOSTNAME_COMMAND` injection. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79e27f8c..a229dc99 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ KAFKA_ADVERTISED_LISTENERS=SSL://_{HOSTNAME_COMMAND}:9093,PLAINTEXT://9092 If the required advertised port is not static, it may be necessary to determine this programatically. This can be done with the `PORT_COMMAND` environment variable. ``` -PORT_COMMAND: "docker port $$(hostname) 9092/tcp | cut -d: -f2 +PORT_COMMAND: "docker port $$(hostname) 9092/tcp | cut -d: -f2" ``` This can be then interpolated in any other `KAFKA_XXX` config using the `_{PORT_COMMAND}` string, i.e. From 01fbcac3fb6c18e225fb4c10141495df9935e221 Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 29 Mar 2019 11:31:30 +0000 Subject: [PATCH 10/43] Fallback to Apache server if mirror is not available (#476) Fixes #475 --- download-kafka.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/download-kafka.sh b/download-kafka.sh index 0b50015d..00bf4511 100755 --- a/download-kafka.sh +++ b/download-kafka.sh @@ -5,18 +5,13 @@ source "/usr/bin/versions.sh" FILENAME="kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz" -## Versions prior to 0.10.2.1 are not actively mirrored -echo "Downloading kafka $MAJOR_VERSION.$MINOR_VERSION" -if [[ "$MAJOR_VERSION" == "0" && "$MINOR_VERSION" -lt "11" ]]; then - echo "Version prior to 0.10.2.1 - downloading direct" - url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/${FILENAME}" -else - url=$(curl --stderr /dev/null "https://www.apache.org/dyn/closer.cgi?path=/kafka/${KAFKA_VERSION}/${FILENAME}&as_json=1" | jq -r '"\(.preferred)\(.path_info)"') -fi +url=$(curl --stderr /dev/null "https://www.apache.org/dyn/closer.cgi?path=/kafka/${KAFKA_VERSION}/${FILENAME}&as_json=1" | jq -r '"\(.preferred)\(.path_info)"') -if [[ -z "$url" ]]; then - echo "Unable to determine mirror for downloading Kafka, the service may be down" - exit 1 +# Test to see if the suggested mirror has this version, currently pre 2.1.1 versions +# do not appear to be actively mirrored. This may also be useful if closer.cgi is down. +if [[ ! $(curl -s -f -I "${url}") ]]; then + echo "Mirror does not have desired version, downloading direct from Apache" + url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/${FILENAME}" fi echo "Downloading Kafka from $url" From 650171a24e959a2c6514bde4e0924da6ee54f7f9 Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 29 Mar 2019 13:05:13 +0000 Subject: [PATCH 11/43] Add Kafka 2.2.0 (#473) --- .travis.yml | 4 +++- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 3 +-- test/docker-compose.yml | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9f63f460..9a557233 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.1.1" + - LATEST="2.12-2.2.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -29,6 +29,8 @@ matrix: env: KAFKA_VERSION=2.0.1 - scala: 2.12 env: KAFKA_VERSION=2.1.1 + - scala: 2.12 + env: KAFKA_VERSION=2.2.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 568a7e50..5637bade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +27-Mar-2019 +----------- + +- Add support for Kafka `2.2.0` + 21-Feb-2019 ----------- diff --git a/Dockerfile b/Dockerfile index e73e23d3..b9206be1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u191-jre-alpine -ARG kafka_version=2.1.1 +ARG kafka_version=2.2.0 ARG scala_version=2.12 ARG glibc_version=2.29-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index a229dc99..761cd378 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.12-2.2.0` - `2.12-2.1.1` - `2.12-2.0.1` - `2.11-1.1.1` @@ -32,8 +33,6 @@ Everytime the image is updated, all tags will be pushed with the latest updates. ## Announcements * **01-Feb-2019** - Update base image to openjdk 191 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u191-relnotes-5032181.html)). Please force pull to get these latest updates - including security patches etc. -* **11-Nov-2018** - Update base image to openjdk 181 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u181-relnotes-4479407.html)). Please force pull to get these latest updates - including security patches etc. -* **28-May-2018** - New docker image tag format - see Readme. --- diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 4006b4d0..ab9d2c89 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -35,7 +35,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.1.1} + - KAFKA_VERSION=${KAFKA_VERSION-2.2.0} volumes: - .:/tests working_dir: /tests From f570cff6c925923ee3d5c6deac991abebf77321e Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 11 Apr 2019 15:26:22 +0800 Subject: [PATCH 12/43] Consistent use of $KAFKA_HOME variable (#484) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b9206be1..2708d642 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN apk add --no-cache bash curl jq docker \ && sync && /tmp/download-kafka.sh \ && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt \ && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz \ - && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka \ + && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} ${KAFKA_HOME} \ && rm /tmp/* \ && wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \ && apk add --no-cache --allow-untrusted glibc-${GLIBC_VERSION}.apk \ From fc8b6d8ffd3df21c8bc855d1ceaa1d39afed6a08 Mon Sep 17 00:00:00 2001 From: sscaling Date: Mon, 15 Apr 2019 19:33:50 +0100 Subject: [PATCH 13/43] update to openjdk-8u201 base image (#485) --- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5637bade..c7a80e7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +15-Apr-2019 +----------- + +- Update base image to openjdk:8u201-jre-alpine + 27-Mar-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 2708d642..b8112d76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8u191-jre-alpine +FROM openjdk:8u201-jre-alpine ARG kafka_version=2.2.0 ARG scala_version=2.12 diff --git a/README.md b/README.md index 761cd378..96602612 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Everytime the image is updated, all tags will be pushed with the latest updates. ## Announcements -* **01-Feb-2019** - Update base image to openjdk 191 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u191-relnotes-5032181.html)). Please force pull to get these latest updates - including security patches etc. +* **15-Apr-2019** - Update base image to openjdk 201 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u201-relnotes-5209271.html). Please force pull to get these latest updates - including security patches etc. --- From f9d5a9baaabaa3c934dcef34061fcfa237f16247 Mon Sep 17 00:00:00 2001 From: sscaling Date: Tue, 4 Jun 2019 10:36:19 +0100 Subject: [PATCH 14/43] Support Kafka 2.2.1 (#501) --- .travis.yml | 4 ++-- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 2 +- test/docker-compose.yml | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a557233..0af2dc72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.2.0" + - LATEST="2.12-2.2.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -30,7 +30,7 @@ matrix: - scala: 2.12 env: KAFKA_VERSION=2.1.1 - scala: 2.12 - env: KAFKA_VERSION=2.2.0 + env: KAFKA_VERSION=2.2.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index c7a80e7a..9e73b62e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +04-Jun-2019 +----------- + +- Updated `2.2.x` version to Kafka `2.2.1` + 15-Apr-2019 ----------- diff --git a/Dockerfile b/Dockerfile index b8112d76..394b8f9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u201-jre-alpine -ARG kafka_version=2.2.0 +ARG kafka_version=2.2.1 ARG scala_version=2.12 ARG glibc_version=2.29-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index 96602612..d3488826 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.12-2.2.0` +- `2.12-2.2.1` - `2.12-2.1.1` - `2.12-2.0.1` - `2.11-1.1.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index ab9d2c89..e51e96b4 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -35,7 +35,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.2.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.2.1} volumes: - .:/tests working_dir: /tests From 2a5bcb747883e28834212d3179f8254e352d6150 Mon Sep 17 00:00:00 2001 From: sscaling Date: Tue, 4 Jun 2019 11:59:09 +0100 Subject: [PATCH 15/43] update to openjdk-8u212 base image (#502) --- CHANGELOG.md | 1 + Dockerfile | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e73b62e..48454503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Kafka features are not tied to a specific kafka-docker version (ideally all chan ----------- - Updated `2.2.x` version to Kafka `2.2.1` +- Update base image to openjdk:8u212-jre-alpine 15-Apr-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 394b8f9c..8bb9693c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8u201-jre-alpine +FROM openjdk:8u212-jre-alpine ARG kafka_version=2.2.1 ARG scala_version=2.12 diff --git a/README.md b/README.md index d3488826..2e4f8843 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Everytime the image is updated, all tags will be pushed with the latest updates. ## Announcements -* **15-Apr-2019** - Update base image to openjdk 201 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u201-relnotes-5209271.html). Please force pull to get these latest updates - including security patches etc. +* **04-Jun-2019** - Update base image to openjdk 212 ([Release notes](https://www.oracle.com/technetwork/java/javase/8u212-relnotes-5292913.html). Please force pull to get these latest updates - including security patches etc. --- From 37f85717412018870328fc9f02ba6a34afa5ff50 Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 28 Jun 2019 13:58:19 +0100 Subject: [PATCH 16/43] Support Kafka 2.3.0 (#514) --- .travis.yml | 4 +++- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 1 + test/docker-compose.yml | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0af2dc72..57a793ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.2.1" + - LATEST="2.12-2.3.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -31,6 +31,8 @@ matrix: env: KAFKA_VERSION=2.1.1 - scala: 2.12 env: KAFKA_VERSION=2.2.1 + - scala: 2.12 + env: KAFKA_VERSION=2.3.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 48454503..cd5606f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +28-Jun-2019 +----------- + +- Add support for Kafka `2.3.0` + 04-Jun-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 8bb9693c..9ccfe7a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.2.1 +ARG kafka_version=2.3.0 ARG scala_version=2.12 ARG glibc_version=2.29-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index 2e4f8843..19ff8112 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.12-2.3.0` - `2.12-2.2.1` - `2.12-2.1.1` - `2.12-2.0.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index e51e96b4..08800746 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -35,7 +35,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.2.1} + - KAFKA_VERSION=${KAFKA_VERSION-2.3.0} volumes: - .:/tests working_dir: /tests From 306df5748c6426769d77aab9176bcf4141dfd70e Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 20 Dec 2019 14:06:50 +0000 Subject: [PATCH 17/43] Fix compatibility with docker-compose 1.23.1 (#539) Fixes #537 --- .travis.yml | 4 +-- test/Readme.md | 3 +-- test/docker-compose.yml | 36 +++++++++++++++++++-------- test/scenarios/jmx/docker-compose.yml | 2 +- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 57a793ce..1b14d354 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,8 +45,7 @@ install: - docker pull confluentinc/cp-kafkacat before_script: - - docker-compose -f test/docker-compose.yml up -d zookeeper - - docker-compose -f test/docker-compose.yml scale kafka=2 + - docker-compose -f test/docker-compose.yml up -d zookeeper kafka_1 kafka_2 script: # Shellcheck main source files @@ -56,6 +55,7 @@ script: - shellcheck -x -e SC1090 -s bash *.sh **/*.sh - ./verifyImageLabels.sh # Verify docker image's label - sleep 5 # Wait for containers to start + - docker-compose logs - docker ps -a - ./runAllTests.sh # End-to-End scenario tests diff --git a/test/Readme.md b/test/Readme.md index d6c3bc3d..cdc72c19 100644 --- a/test/Readme.md +++ b/test/Readme.md @@ -8,8 +8,7 @@ To execute ``` cd test -docker-compose up -d zookeeper -docker-compose scale kafka=2 +docker-compose up -d zookeeper kafka_1 kafka_2 ./runAllTests.sh ``` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 08800746..77c4e70b 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,21 +1,35 @@ version: '2.1' + +x-kafka-defaults: &kafka-defaults + image: wurstmeister/kafka + ports: + - "9092" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + +x-kafka-environment-defaults: &kafka-environment-defaults + HOSTNAME_COMMAND: "echo $$(hostname)" + KAFKA_ADVERTISED_PORT: 9092 + KAFKA_PORT: 9092 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + services: zookeeper: image: wurstmeister/zookeeper ports: - "2181" - kafka: - image: wurstmeister/kafka - ports: - - "9092" + kafka_1: + <<: *kafka-defaults + container_name: test_kafka_1 environment: - HOSTNAME_COMMAND: "echo $$(hostname)" - KAFKA_ADVERTISED_PORT: 9092 - KAFKA_PORT: 9092 - BROKER_ID_COMMAND: "docker inspect --format '{{ .Name }}' $$(hostname) | awk -F_ '{ printf $$NF }'" - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - volumes: - - /var/run/docker.sock:/var/run/docker.sock + <<: *kafka-environment-defaults + KAFKA_BROKER_ID: 1 + kafka_2: + <<: *kafka-defaults + container_name: test_kafka_2 + environment: + <<: *kafka-environment-defaults + KAFKA_BROKER_ID: 2 kafkatest: image: wurstmeister/kafka diff --git a/test/scenarios/jmx/docker-compose.yml b/test/scenarios/jmx/docker-compose.yml index b87c8660..aba78bf2 100644 --- a/test/scenarios/jmx/docker-compose.yml +++ b/test/scenarios/jmx/docker-compose.yml @@ -13,7 +13,7 @@ services: KAFKA_ADVERTISED_HOST_NAME: kafka KAFKA_ADVERTISED_PORT: 9092 KAFKA_PORT: 9092 - BROKER_ID_COMMAND: "docker inspect --format '{{ .Name }}' $$(hostname) | awk -F_ '{ printf $$NF }'" + KAFKA_BROKER_ID: 1 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka -Dcom.sun.management.jmxremote.rmi.port=1099" JMX_PORT: 1099 From a88b071fe48446abeb685c6a13b5496f1654c2f8 Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 20 Dec 2019 14:45:17 +0000 Subject: [PATCH 18/43] Support Kafka 2.3.1 (#536) --- .travis.yml | 4 ++-- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 2 +- test/docker-compose.yml | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b14d354..dd8309cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.3.0" + - LATEST="2.12-2.3.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -32,7 +32,7 @@ matrix: - scala: 2.12 env: KAFKA_VERSION=2.2.1 - scala: 2.12 - env: KAFKA_VERSION=2.3.0 + env: KAFKA_VERSION=2.3.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index cd5606f6..172a043e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +26-Oct-2019 +----------- + +- Add support for Kafka `2.3.1` + 28-Jun-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 9ccfe7a1..3e66d1e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.3.0 +ARG kafka_version=2.3.1 ARG scala_version=2.12 ARG glibc_version=2.29-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index 19ff8112..9e3c19df 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.12-2.3.0` +- `2.12-2.3.1` - `2.12-2.2.1` - `2.12-2.1.1` - `2.12-2.0.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 77c4e70b..3444c3de 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.3.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.3.1} volumes: - .:/tests working_dir: /tests From ccf3d204aca313703ff40bce83453143196ea5bf Mon Sep 17 00:00:00 2001 From: Shyam Sundar Date: Sat, 21 Dec 2019 04:06:19 +1100 Subject: [PATCH 19/43] Support Kafka 2.4.0 (#554) --- .travis.yml | 4 +++- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- test/docker-compose.yml | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd8309cc..ab517f89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.3.1" + - LATEST="2.12-2.4.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -33,6 +33,8 @@ matrix: env: KAFKA_VERSION=2.2.1 - scala: 2.12 env: KAFKA_VERSION=2.3.1 + - scala: 2.12 + env: KAFKA_VERSION=2.4.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 172a043e..16c2671c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +17-Dec-2019 +----------- + +- Add support for Kafka `2.4.0` + 26-Oct-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 3e66d1e5..3ed86911 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.3.1 +ARG kafka_version=2.4.0 ARG scala_version=2.12 ARG glibc_version=2.29-r0 ARG vcs_ref=unspecified diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 3444c3de..f23d814f 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.3.1} + - KAFKA_VERSION=${KAFKA_VERSION-2.4.0} volumes: - .:/tests working_dir: /tests From d7a32ae7212d1279214396809a5e750cde7c848b Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 20 Dec 2019 17:46:42 +0000 Subject: [PATCH 20/43] Update README.md Add 2.4.0 version --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9e3c19df..8fbe7eaf 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.12-2.4.0` - `2.12-2.3.1` - `2.12-2.2.1` - `2.12-2.1.1` From f856031830aad50769e63031728b66b10992f462 Mon Sep 17 00:00:00 2001 From: sscaling Date: Fri, 20 Dec 2019 20:15:16 +0000 Subject: [PATCH 21/43] Support Kafka 2.2.2. glibc to 2.30-r0 (#556) --- .travis.yml | 2 +- CHANGELOG.md | 6 ++++++ Dockerfile | 2 +- README.md | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab517f89..b3a8b025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ matrix: - scala: 2.12 env: KAFKA_VERSION=2.1.1 - scala: 2.12 - env: KAFKA_VERSION=2.2.1 + env: KAFKA_VERSION=2.2.2 - scala: 2.12 env: KAFKA_VERSION=2.3.1 - scala: 2.12 diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c2671c..c23f4886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +20-Dec-2019 +----------- + +- Add support for Kafka `2.2.2` +- Update glibc to 2.30-r0 + 17-Dec-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 3ed86911..8a8ed9e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM openjdk:8u212-jre-alpine ARG kafka_version=2.4.0 ARG scala_version=2.12 -ARG glibc_version=2.29-r0 +ARG glibc_version=2.30-r0 ARG vcs_ref=unspecified ARG build_date=unspecified diff --git a/README.md b/README.md index 8fbe7eaf..24d96f14 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ All versions of the image are built from the same set of scripts with only minor - `2.12-2.4.0` - `2.12-2.3.1` -- `2.12-2.2.1` +- `2.12-2.2.2` - `2.12-2.1.1` - `2.12-2.0.1` - `2.11-1.1.1` From f17dcc4570210fac4192cc7e95f1a2947b1f87c3 Mon Sep 17 00:00:00 2001 From: dlehammer Date: Mon, 23 Dec 2019 09:00:33 +0100 Subject: [PATCH 22/43] Added anchor to "Variable substitution" link. (#548) In-order to aid readability and maintain context. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24d96f14..4781b20f 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ You can configure the advertised hostname in different ways 1. explicitly, using ```KAFKA_ADVERTISED_HOST_NAME``` 2. via a command, using ```HOSTNAME_COMMAND```, e.g. ```HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"``` -When using commands, make sure you review the "Variable Substitution" section in [https://docs.docker.com/compose/compose-file/](https://docs.docker.com/compose/compose-file/) +When using commands, make sure you review the "Variable Substitution" section in [https://docs.docker.com/compose/compose-file/](https://docs.docker.com/compose/compose-file/#variable-substitution) If ```KAFKA_ADVERTISED_HOST_NAME``` is specified, it takes precedence over ```HOSTNAME_COMMAND``` From cb719bf8478500e287e7411e65fefe5e5421489c Mon Sep 17 00:00:00 2001 From: sscaling Date: Mon, 16 Mar 2020 13:32:57 +0000 Subject: [PATCH 23/43] Kafka 2.4.1, glibc 2.31-r0 (#578) --- .travis.yml | 4 ++-- CHANGELOG.md | 6 ++++++ Dockerfile | 4 ++-- README.md | 2 +- test/docker-compose.yml | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3a8b025..0b90c5c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.4.0" + - LATEST="2.12-2.4.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -34,7 +34,7 @@ matrix: - scala: 2.12 env: KAFKA_VERSION=2.3.1 - scala: 2.12 - env: KAFKA_VERSION=2.4.0 + env: KAFKA_VERSION=2.4.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index c23f4886..df4d62e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +16-Mar-2020 +----------- + +- Add support for Kafka `2.4.1` +- Update glibc to `2.31-r0` + 20-Dec-2019 ----------- diff --git a/Dockerfile b/Dockerfile index 8a8ed9e4..22b7d1f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.4.0 +ARG kafka_version=2.4.1 ARG scala_version=2.12 -ARG glibc_version=2.30-r0 +ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified ARG build_date=unspecified diff --git a/README.md b/README.md index 4781b20f..c7fca978 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.12-2.4.0` +- `2.12-2.4.1` - `2.12-2.3.1` - `2.12-2.2.2` - `2.12-2.1.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index f23d814f..a0ccdb36 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.4.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.4.1} volumes: - .:/tests working_dir: /tests From a4558045abc821f5e87f946b024483bf422fbfed Mon Sep 17 00:00:00 2001 From: Ryan Hall Date: Wed, 6 May 2020 13:07:07 -0700 Subject: [PATCH 24/43] Add Kafka 2.5.0 (#589) https://kafka.apache.org/downloads#2.5.0 Needed to update the output check for one test since a new deprecation warning was breaking the awk. bash-4.4# /opt/kafka/bin/kafka-configs.sh --zookeeper zookeeper:2181 --entity-type topics --entity-name "compact-1587412989" --describe Warning: --zookeeper is deprecated and will be removed in a future version of Kafka. Use --bootstrap-server instead to specify a broker to connect to. Configs for topic 'compact-1587412989' are cleanup.policy=compact,compression.type=snappy A simple grep for "Configs for topic" fixed the issue. --- .travis.yml | 4 +++- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 1 + test/0.10/test.create-topics.kafka.sh | 2 +- test/docker-compose.yml | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b90c5c0..8740a9ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.4.1" + - LATEST="2.12-2.5.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -35,6 +35,8 @@ matrix: env: KAFKA_VERSION=2.3.1 - scala: 2.12 env: KAFKA_VERSION=2.4.1 + - scala: 2.12 + env: KAFKA_VERSION=2.5.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index df4d62e0..75acb233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +20-Apr-2020 +----------- + +- Add support for Kafka `2.5.0` + 16-Mar-2020 ----------- diff --git a/Dockerfile b/Dockerfile index 22b7d1f0..6437b5a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.4.1 +ARG kafka_version=2.5.0 ARG scala_version=2.12 ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index c7fca978..26da2160 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.12-2.5.0` - `2.12-2.4.1` - `2.12-2.3.1` - `2.12-2.2.2` diff --git a/test/0.10/test.create-topics.kafka.sh b/test/0.10/test.create-topics.kafka.sh index b5eb4bd4..e9dda7bd 100755 --- a/test/0.10/test.create-topics.kafka.sh +++ b/test/0.10/test.create-topics.kafka.sh @@ -22,7 +22,7 @@ testCreateTopics() { echo "Validating topic '$TOPIC'" EXISTS=$(/opt/kafka/bin/kafka-topics.sh --zookeeper "$KAFKA_ZOOKEEPER_CONNECT" --list --topic "$TOPIC") - POLICY=$(/opt/kafka/bin/kafka-configs.sh --zookeeper "$KAFKA_ZOOKEEPER_CONNECT" --entity-type topics --entity-name "$TOPIC" --describe | awk -F'cleanup.policy=' '{print $2}') + POLICY=$(/opt/kafka/bin/kafka-configs.sh --zookeeper "$KAFKA_ZOOKEEPER_CONNECT" --entity-type topics --entity-name "$TOPIC" --describe | grep 'Configs for topic' | awk -F'cleanup.policy=' '{print $2}') RESULT="$EXISTS:$POLICY" EXPECTED="$TOPIC:${CLEANUP[i]}" diff --git a/test/docker-compose.yml b/test/docker-compose.yml index a0ccdb36..eb8ea444 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.4.1} + - KAFKA_VERSION=${KAFKA_VERSION-2.5.0} volumes: - .:/tests working_dir: /tests From 9a435ae102fd3b75969def55ae732ff7e764f671 Mon Sep 17 00:00:00 2001 From: Ricardo de Cillo Date: Mon, 17 Aug 2020 12:36:00 +0200 Subject: [PATCH 25/43] Add support for Kafka 2.6.0 (#613) Kafka 2.6.0 was announced today 2020-08-06 on Apache's blog https://blogs.apache.org/kafka/entry/what-s-new-in-apache3. This PR adds support for it using the previous upgrade as a template https://github.com/wurstmeister/kafka-docker/pull/589 The scala version was upgraded from 2.12 to 2.13 as recommended on the download page https://kafka.apache.org/downloads.html --- .travis.yml | 4 +++- CHANGELOG.md | 5 +++++ Dockerfile | 4 ++-- README.md | 1 + test/docker-compose.yml | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8740a9ed..f085dddc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.12-2.5.0" + - LATEST="2.13-2.6.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -37,6 +37,8 @@ matrix: env: KAFKA_VERSION=2.4.1 - scala: 2.12 env: KAFKA_VERSION=2.5.0 + - scala: 2.13 + env: KAFKA_VERSION=2.6.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 75acb233..e5669a0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +06-Aug-2020 +----------- + +- Add support for Kafka `2.6.0` + 20-Apr-2020 ----------- diff --git a/Dockerfile b/Dockerfile index 6437b5a0..469cf95a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.5.0 -ARG scala_version=2.12 +ARG kafka_version=2.6.0 +ARG scala_version=2.13 ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified ARG build_date=unspecified diff --git a/README.md b/README.md index 26da2160..803894fc 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.13-2.6.0` - `2.12-2.5.0` - `2.12-2.4.1` - `2.12-2.3.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index eb8ea444..3c3ac826 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.5.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.6.0} volumes: - .:/tests working_dir: /tests From 1c54372e408b07c8d7476c4003858684d8370129 Mon Sep 17 00:00:00 2001 From: "huang.xinghui" Date: Sat, 2 Jan 2021 19:59:04 +0800 Subject: [PATCH 26/43] Add Kafka 2.7.0 (#635) --- .travis.yml | 4 +++- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 1 + test/docker-compose.yml | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f085dddc..30595423 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.13-2.6.0" + - LATEST="2.13-2.7.0" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -39,6 +39,8 @@ matrix: env: KAFKA_VERSION=2.5.0 - scala: 2.13 env: KAFKA_VERSION=2.6.0 + - scala: 2.13 + env: KAFKA_VERSION=2.7.0 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index e5669a0a..0e0fce52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +30-Dec-2020 +----------- + +- Add support for Kafka `2.7.0` + 06-Aug-2020 ----------- diff --git a/Dockerfile b/Dockerfile index 469cf95a..5eca3982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM openjdk:8u212-jre-alpine -ARG kafka_version=2.6.0 +ARG kafka_version=2.7.0 ARG scala_version=2.13 ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index 803894fc..d55939ad 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.13-2.7.0` - `2.13-2.6.0` - `2.12-2.5.0` - `2.12-2.4.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 3c3ac826..42a7ca59 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.6.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.7.0} volumes: - .:/tests working_dir: /tests From 44e53a7197c4947b4d56050178abbd6320fd85d2 Mon Sep 17 00:00:00 2001 From: jackjliew <47856084+jackjliew@users.noreply.github.com> Date: Thu, 22 Apr 2021 22:31:03 +0800 Subject: [PATCH 27/43] fix broker-list.sh if two or more brokers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the official doc below, "If pattern begins with ‘/’, all matches of pattern are replaced with string. Normally only the first match is replaced." [3.5.3 Shell Parameter Expansion](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html) --- broker-list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker-list.sh b/broker-list.sh index 73aa8220..5c5ee2d7 100755 --- a/broker-list.sh +++ b/broker-list.sh @@ -2,4 +2,4 @@ CONTAINERS=$(docker ps | grep 9092 | awk '{print $1}') BROKERS=$(for CONTAINER in ${CONTAINERS}; do docker port "$CONTAINER" 9092 | sed -e "s/0.0.0.0:/$HOST_IP:/g"; done) -echo "${BROKERS/$'\n'/,}" +echo "${BROKERS//$'\n'/,}" From 3ac71e77d5034ac25abd285400261e3a83d4421d Mon Sep 17 00:00:00 2001 From: Carlos Rafael Ramirez Date: Wed, 24 Mar 2021 14:20:04 +0100 Subject: [PATCH 28/43] Change the docker api version in the environment Making this solution permanent: https://github.com/wurstmeister/kafka-docker/issues/521#issuecomment-513686032 --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 04b82c37..30ad6c4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: ports: - "9092" environment: + DOCKER_API_VERSION: 1.22 KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 volumes: From 814f8fa88bb74095e3520c72f9c42f0605377226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my?= Date: Mon, 4 Jan 2021 14:40:38 +0100 Subject: [PATCH 29/43] Fix typo --- start-kafka.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start-kafka.sh b/start-kafka.sh index 85359118..56927db4 100755 --- a/start-kafka.sh +++ b/start-kafka.sh @@ -52,7 +52,7 @@ fi if [[ -n "$HOSTNAME_COMMAND" ]]; then HOSTNAME_VALUE=$(eval "$HOSTNAME_COMMAND") - # Replace any occurences of _{HOSTNAME_COMMAND} with the value + # Replace any occurrences of _{HOSTNAME_COMMAND} with the value IFS=$'\n' for VAR in $(env); do if [[ $VAR =~ ^KAFKA_ && "$VAR" =~ "_{HOSTNAME_COMMAND}" ]]; then @@ -65,7 +65,7 @@ fi if [[ -n "$PORT_COMMAND" ]]; then PORT_VALUE=$(eval "$PORT_COMMAND") - # Replace any occurences of _{PORT_COMMAND} with the value + # Replace any occurrences of _{PORT_COMMAND} with the value IFS=$'\n' for VAR in $(env); do if [[ $VAR =~ ^KAFKA_ && "$VAR" =~ "_{PORT_COMMAND}" ]]; then From fa6c38e60bf208aca8027772182503cf63a25f80 Mon Sep 17 00:00:00 2001 From: wurstmeister Date: Sat, 5 Jun 2021 07:55:24 +0100 Subject: [PATCH 30/43] drop support for versions < 2.0.1 * authenticate docker pulls --- .travis.yml | 13 +------------ CHANGELOG.md | 5 +++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30595423..05e54d19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,18 +13,6 @@ env: # Build recommended versions based on: http://kafka.apache.org/downloads matrix: include: - - scala: "2.10" - env: KAFKA_VERSION=0.8.2.2 - - scala: 2.11 - env: KAFKA_VERSION=0.9.0.1 - - scala: 2.11 - env: KAFKA_VERSION=0.10.2.2 - - scala: 2.11 - env: KAFKA_VERSION=0.11.0.3 - - scala: 2.11 - env: KAFKA_VERSION=1.0.2 - - scala: 2.11 - env: KAFKA_VERSION=1.1.1 - scala: 2.12 env: KAFKA_VERSION=2.0.1 - scala: 2.12 @@ -48,6 +36,7 @@ install: - echo "KAFKA VERSION $KAFKA_VERSION" - echo "SCALA VERSION $TRAVIS_SCALA_VERSION" - echo "LATEST VERSION $LATEST" + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - export CURRENT=${TRAVIS_SCALA_VERSION}-${KAFKA_VERSION} - docker build --build-arg kafka_version=$KAFKA_VERSION --build-arg scala_version=$TRAVIS_SCALA_VERSION --build-arg vcs_ref=$TRAVIS_COMMIT --build-arg build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -t wurstmeister/kafka . - docker pull confluentinc/cp-kafkacat diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e0fce52..9ad71488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +05-Jun-2021 +----------- + +- Dropped support for versions < 2.0.1 + 30-Dec-2020 ----------- From 8c8ea7dbdd931b6f5bbb40e0b02ae3f24691ab78 Mon Sep 17 00:00:00 2001 From: wurstmeister Date: Sat, 5 Jun 2021 08:58:00 +0100 Subject: [PATCH 31/43] use unauthenticated pulls on PR builds --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 05e54d19..d6bbdf67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ install: - echo "KAFKA VERSION $KAFKA_VERSION" - echo "SCALA VERSION $TRAVIS_SCALA_VERSION" - echo "LATEST VERSION $LATEST" - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - if [ -z ${DOCKER_PASSWORD+x} ]; then echo "Using unauthenticated pulls on PR"; else echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; fi - export CURRENT=${TRAVIS_SCALA_VERSION}-${KAFKA_VERSION} - docker build --build-arg kafka_version=$KAFKA_VERSION --build-arg scala_version=$TRAVIS_SCALA_VERSION --build-arg vcs_ref=$TRAVIS_COMMIT --build-arg build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -t wurstmeister/kafka . - docker pull confluentinc/cp-kafkacat From 82a4f74ec7808393d7eb7063ed624242697d04c7 Mon Sep 17 00:00:00 2001 From: Filipe Azevedo Date: Wed, 5 May 2021 09:54:13 +0100 Subject: [PATCH 32/43] Update openjdk image The previous image was crashing on M1. After trying a few different images, this one seems to solve the problem Closes https://github.com/wurstmeister/kafka-docker/issues/647 --- CHANGELOG.md | 4 ++++ Dockerfile | 2 +- download-kafka.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ad71488..dbb85bd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +06-Jun-2021 +---------- +- Add support for darwin arm by to azul/zulu-openjdk-alpine base image + 05-Jun-2021 ----------- diff --git a/Dockerfile b/Dockerfile index 5eca3982..82b4ee6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8u212-jre-alpine +FROM azul/zulu-openjdk-alpine:8u292-8.54.0.21 ARG kafka_version=2.7.0 ARG scala_version=2.13 diff --git a/download-kafka.sh b/download-kafka.sh index 00bf4511..746ef93f 100755 --- a/download-kafka.sh +++ b/download-kafka.sh @@ -9,7 +9,7 @@ url=$(curl --stderr /dev/null "https://www.apache.org/dyn/closer.cgi?path=/kafka # Test to see if the suggested mirror has this version, currently pre 2.1.1 versions # do not appear to be actively mirrored. This may also be useful if closer.cgi is down. -if [[ ! $(curl -s -f -I "${url}") ]]; then +if [[ ! $(curl -f -s -r 0-1 "${url}") ]]; then echo "Mirror does not have desired version, downloading direct from Apache" url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/${FILENAME}" fi From edad801e3e877828e9a12e14eabea33153347344 Mon Sep 17 00:00:00 2001 From: Liang Li Date: Mon, 19 Jul 2021 16:28:40 -0700 Subject: [PATCH 33/43] Add support for Kafka 2.7.1 --- .travis.yml | 4 ++-- CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 2 +- test/docker-compose.yml | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6bbdf67..6b32acb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.13-2.7.0" + - LATEST="2.13-2.7.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: @@ -28,7 +28,7 @@ matrix: - scala: 2.13 env: KAFKA_VERSION=2.6.0 - scala: 2.13 - env: KAFKA_VERSION=2.7.0 + env: KAFKA_VERSION=2.7.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index dbb85bd3..ebefdf17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +19-July-2021 +---------- + +- Add support for Kafka `2.7.1` + 06-Jun-2021 ---------- - Add support for darwin arm by to azul/zulu-openjdk-alpine base image diff --git a/Dockerfile b/Dockerfile index 82b4ee6d..668ac714 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM azul/zulu-openjdk-alpine:8u292-8.54.0.21 -ARG kafka_version=2.7.0 +ARG kafka_version=2.7.1 ARG scala_version=2.13 ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index d55939ad..b015595c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: -- `2.13-2.7.0` +- `2.13-2.7.1` - `2.13-2.6.0` - `2.12-2.5.0` - `2.12-2.4.1` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 42a7ca59..0aa8ad9b 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.7.0} + - KAFKA_VERSION=${KAFKA_VERSION-2.7.1} volumes: - .:/tests working_dir: /tests From f5f2eaa9092a6fc151380126b4111bd5ca785d83 Mon Sep 17 00:00:00 2001 From: Dan <38569345+LatentLag@users.noreply.github.com> Date: Thu, 8 Jul 2021 01:59:26 -0700 Subject: [PATCH 34/43] Fix sed: unmatched '@' error. When restarting a container `docker port` reports more than one port. Pick the first port and complete startup. The unmatched '@' is from a newline at the end of the string. --- start-kafka.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-kafka.sh b/start-kafka.sh index 56927db4..f8aa5a12 100755 --- a/start-kafka.sh +++ b/start-kafka.sh @@ -26,7 +26,7 @@ if [[ -z "$KAFKA_ADVERTISED_PORT" && \ -z "$KAFKA_LISTENERS" && \ -z "$KAFKA_ADVERTISED_LISTENERS" && \ -S /var/run/docker.sock ]]; then - KAFKA_ADVERTISED_PORT=$(docker port "$(hostname)" $KAFKA_PORT | sed -r 's/.*:(.*)/\1/g') + KAFKA_ADVERTISED_PORT=$(docker port "$(hostname)" $KAFKA_PORT | sed -r 's/.*:(.*)/\1/g') | head -n1 export KAFKA_ADVERTISED_PORT fi From 7742d7613a09e404777778d22212e78d06ea8591 Mon Sep 17 00:00:00 2001 From: wurstmeister Date: Mon, 4 Oct 2021 16:28:49 +0200 Subject: [PATCH 35/43] fixed start script --- start-kafka.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-kafka.sh b/start-kafka.sh index f8aa5a12..b48280a4 100755 --- a/start-kafka.sh +++ b/start-kafka.sh @@ -26,7 +26,7 @@ if [[ -z "$KAFKA_ADVERTISED_PORT" && \ -z "$KAFKA_LISTENERS" && \ -z "$KAFKA_ADVERTISED_LISTENERS" && \ -S /var/run/docker.sock ]]; then - KAFKA_ADVERTISED_PORT=$(docker port "$(hostname)" $KAFKA_PORT | sed -r 's/.*:(.*)/\1/g') | head -n1 + KAFKA_ADVERTISED_PORT=$(docker port "$(hostname)" $KAFKA_PORT | sed -r 's/.*:(.*)/\1/g' | head -n1) export KAFKA_ADVERTISED_PORT fi From da5266b46d97ce6d4b780cd5f158e66a9cb2e5c8 Mon Sep 17 00:00:00 2001 From: wurstmeister Date: Wed, 6 Oct 2021 05:46:10 +0100 Subject: [PATCH 36/43] updated build status to travis-ci.com --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b015595c..629ddbd9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [![Docker Stars](https://img.shields.io/docker/stars/wurstmeister/kafka.svg)](https://hub.docker.com/r/wurstmeister/kafka/) [![](https://images.microbadger.com/badges/version/wurstmeister/kafka.svg)](https://microbadger.com/images/wurstmeister/kafka "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/wurstmeister/kafka.svg)](https://microbadger.com/images/wurstmeister/kafka "Get your own image badge on microbadger.com") -[![Build Status](https://travis-ci.org/wurstmeister/kafka-docker.svg?branch=master)](https://travis-ci.org/wurstmeister/kafka-docker) +[![Build Status](https://app.travis-ci.com/wurstmeister/kafka-docker.svg?branch=master)](https://travis-ci.org/wurstmeister/kafka-docker) + kafka-docker ============ From 85ca0564640b189f86c4f5842ab6d5fe0d80658e Mon Sep 17 00:00:00 2001 From: Dhruv Jauhar Date: Mon, 4 Oct 2021 02:20:55 -0400 Subject: [PATCH 37/43] Add support for kafka 2.8.1 --- .travis.yml | 2 ++ CHANGELOG.md | 5 +++++ Dockerfile | 2 +- README.md | 1 + test/docker-compose.yml | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b32acb9..0f0a0f99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,8 @@ matrix: env: KAFKA_VERSION=2.6.0 - scala: 2.13 env: KAFKA_VERSION=2.7.1 + - scala: 2.13 + env: KAFKA_VERSION=2.8.1 install: - docker --version diff --git a/CHANGELOG.md b/CHANGELOG.md index ebefdf17..eec33e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +04-Oct-2021 +---------- + +- Add support for Kafka `2.8.1` + 19-July-2021 ---------- diff --git a/Dockerfile b/Dockerfile index 668ac714..a6bfb3d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM azul/zulu-openjdk-alpine:8u292-8.54.0.21 -ARG kafka_version=2.7.1 +ARG kafka_version=2.8.1 ARG scala_version=2.13 ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified diff --git a/README.md b/README.md index 629ddbd9..7c0ce244 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Tags and releases All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: +- `2.13-2.8.1` - `2.13-2.7.1` - `2.13-2.6.0` - `2.12-2.5.0` diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 0aa8ad9b..42316de2 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -49,7 +49,7 @@ services: image: confluentinc/cp-kafkacat:5.0.0 environment: - BROKER_LIST - - KAFKA_VERSION=${KAFKA_VERSION-2.7.1} + - KAFKA_VERSION=${KAFKA_VERSION-2.8.1} volumes: - .:/tests working_dir: /tests From cb3be11316f5f2d03d4a69d7f0cbff4c79f58b7b Mon Sep 17 00:00:00 2001 From: wurstmeister Date: Thu, 9 Dec 2021 09:03:55 +0000 Subject: [PATCH 38/43] fixed latest reference in build config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0f0a0f99..e46ccf6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: # This version will be also tagged as 'latest' env: global: - - LATEST="2.13-2.7.1" + - LATEST="2.13-2.8.1" # Build recommended versions based on: http://kafka.apache.org/downloads matrix: From c4e8f17fc9bbfe713b31bd9969babbb59523147b Mon Sep 17 00:00:00 2001 From: PC Drew Date: Thu, 30 Dec 2021 02:11:54 -0700 Subject: [PATCH 39/43] Support multi-architecture builds for amd64 and arm64 (#694) * Support multi-architecture builds for amd64 and arm64. Add back the Scala/Kafka versions that match the README "Tags and releases" section to ensure we get multi-architecture builds for those releases as well. Fixed the link target for Travis CI in the build icon. --- .travis.yml | 32 +++++++++++++++++++++++++++++++- README.md | 2 +- docker_buildx | 32 ++++++++++++++++++++++++++++++++ docker_push | 5 +++-- 4 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 docker_buildx diff --git a/.travis.yml b/.travis.yml index e46ccf6e..465b32bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,18 @@ env: # Build recommended versions based on: http://kafka.apache.org/downloads matrix: include: + - scala: 2.10 + env: KAFKA_VERSION=0.8.2.2 + - scala: 2.11 + env: KAFKA_VERSION=0.9.0.1 + - scala: 2.11 + env: KAFKA_VERSION=0.10.2.2 + - scala: 2.11 + env: KAFKA_VERSION=0.11.0.3 + - scala: 2.11 + env: KAFKA_VERSION=1.0.2 + - scala: 2.11 + env: KAFKA_VERSION=1.1.1 - scala: 2.12 env: KAFKA_VERSION=2.0.1 - scala: 2.12 @@ -32,15 +44,33 @@ matrix: - scala: 2.13 env: KAFKA_VERSION=2.8.1 +# Upgrade Docker Engine so we can use buildx +before_install: + - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + - sudo apt-get update + - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce + install: - docker --version + - docker buildx version - docker-compose --version - echo "KAFKA VERSION $KAFKA_VERSION" - echo "SCALA VERSION $TRAVIS_SCALA_VERSION" - echo "LATEST VERSION $LATEST" - if [ -z ${DOCKER_PASSWORD+x} ]; then echo "Using unauthenticated pulls on PR"; else echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; fi - export CURRENT=${TRAVIS_SCALA_VERSION}-${KAFKA_VERSION} - - docker build --build-arg kafka_version=$KAFKA_VERSION --build-arg scala_version=$TRAVIS_SCALA_VERSION --build-arg vcs_ref=$TRAVIS_COMMIT --build-arg build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -t wurstmeister/kafka . + + # Prepare the environment for multi-arch builds + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - docker buildx create --use + + # Build all of the platforms and cache the result + - bash docker_buildx + + # Using the multi-arch build cache, load the current architecture image into docker for the + # subsequent docker-compose/test stuff. + - bash docker_buildx --load - docker pull confluentinc/cp-kafkacat before_script: diff --git a/README.md b/README.md index 7c0ce244..46385020 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Docker Stars](https://img.shields.io/docker/stars/wurstmeister/kafka.svg)](https://hub.docker.com/r/wurstmeister/kafka/) [![](https://images.microbadger.com/badges/version/wurstmeister/kafka.svg)](https://microbadger.com/images/wurstmeister/kafka "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/wurstmeister/kafka.svg)](https://microbadger.com/images/wurstmeister/kafka "Get your own image badge on microbadger.com") -[![Build Status](https://app.travis-ci.com/wurstmeister/kafka-docker.svg?branch=master)](https://travis-ci.org/wurstmeister/kafka-docker) +[![Build Status](https://app.travis-ci.com/wurstmeister/kafka-docker.svg?branch=master)](https://app.travis-ci.com/wurstmeister/kafka-docker) kafka-docker diff --git a/docker_buildx b/docker_buildx new file mode 100644 index 00000000..41971341 --- /dev/null +++ b/docker_buildx @@ -0,0 +1,32 @@ +#!/bin/bash -e + +# Build for amd64 and arm64 +PLATFORMS="linux/amd64,linux/arm64" + +EXTRA_BUILDX_ARGS=$@ +CACHE_LOCATION="/tmp/docker-cache" + +if [[ "${EXTRA_BUILDX_ARGS}" == *"--load"* ]]; then + # We have to load the image for the current architecture only in order to run tests, so let's + # pull FROM the multi-arch build that happened previously + PLATFORMS="linux/${TRAVIS_CPU_ARCH}" + CACHE="--cache-from=type=local,src=${CACHE_LOCATION}" +elif [[ "${EXTRA_BUILDX_ARGS}" == *"--push"* ]]; then + # Push ALL architectures FROM the multi-arch build cache that happened previously + CACHE="--cache-from=type=local,src=${CACHE_LOCATION}" +else + # This is the multi-arch build that we should cache and use later + CACHE="--cache-to=type=local,dest=${CACHE_LOCATION}" +fi + +docker buildx build \ + $CACHE \ + --platform "${PLATFORMS}" \ + --progress=plain \ + --build-arg kafka_version=$KAFKA_VERSION \ + --build-arg scala_version=$TRAVIS_SCALA_VERSION \ + --build-arg vcs_ref=$TRAVIS_COMMIT \ + --build-arg build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + -t wurstmeister/kafka \ + $EXTRA_BUILDX_ARGS \ + . \ No newline at end of file diff --git a/docker_push b/docker_push index 99975bb9..1cd1990d 100755 --- a/docker_push +++ b/docker_push @@ -10,5 +10,6 @@ fi echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin TARGET="$BASE_IMAGE:$IMAGE_VERSION" -docker tag "$BASE_IMAGE" "$TARGET" -docker push "$TARGET" +bash docker_buildx \ + -t "$TARGET" \ + --push From 654d16b8983b58ba13c25369962e9536810d2c01 Mon Sep 17 00:00:00 2001 From: wurstmeister Date: Thu, 30 Dec 2021 09:37:07 +0000 Subject: [PATCH 40/43] drop support for versions < 2.0.1 * update minor versions to latest available * included script to retrieve available tags in readme --- .travis.yml | 18 +++--------------- README.md | 22 +++++----------------- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 465b32bf..0700111d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,18 +13,6 @@ env: # Build recommended versions based on: http://kafka.apache.org/downloads matrix: include: - - scala: 2.10 - env: KAFKA_VERSION=0.8.2.2 - - scala: 2.11 - env: KAFKA_VERSION=0.9.0.1 - - scala: 2.11 - env: KAFKA_VERSION=0.10.2.2 - - scala: 2.11 - env: KAFKA_VERSION=0.11.0.3 - - scala: 2.11 - env: KAFKA_VERSION=1.0.2 - - scala: 2.11 - env: KAFKA_VERSION=1.1.1 - scala: 2.12 env: KAFKA_VERSION=2.0.1 - scala: 2.12 @@ -36,11 +24,11 @@ matrix: - scala: 2.12 env: KAFKA_VERSION=2.4.1 - scala: 2.12 - env: KAFKA_VERSION=2.5.0 + env: KAFKA_VERSION=2.5.1 - scala: 2.13 - env: KAFKA_VERSION=2.6.0 + env: KAFKA_VERSION=2.6.3 - scala: 2.13 - env: KAFKA_VERSION=2.7.1 + env: KAFKA_VERSION=2.7.2 - scala: 2.13 env: KAFKA_VERSION=2.8.1 diff --git a/README.md b/README.md index 46385020..ca0ce84a 100644 --- a/README.md +++ b/README.md @@ -15,23 +15,11 @@ The image is available directly from [Docker Hub](https://hub.docker.com/r/wurst Tags and releases ----------------- -All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). Available tags are: - -- `2.13-2.8.1` -- `2.13-2.7.1` -- `2.13-2.6.0` -- `2.12-2.5.0` -- `2.12-2.4.1` -- `2.12-2.3.1` -- `2.12-2.2.2` -- `2.12-2.1.1` -- `2.12-2.0.1` -- `2.11-1.1.1` -- `2.11-1.0.2` -- `2.11-0.11.0.3` -- `2.11-0.10.2.2` -- `2.11-0.9.0.1` -- `2.10-0.8.2.2` +All versions of the image are built from the same set of scripts with only minor variations (i.e. certain features are not supported on older versions). The version format mirrors the Kafka format, `-`. Initially, all images are built with the recommended version of scala documented on [http://kafka.apache.org/downloads](http://kafka.apache.org/downloads). To list all available tags: + +``` +curl -s https://registry.hub.docker.com/v2/repositories/wurstmeister/kafka/tags\?page_size\=1024 | jq -r '.results[].name' | sort -u | egrep '\d.\d{2}-.*' +``` Everytime the image is updated, all tags will be pushed with the latest updates. This should allow for greater consistency across tags, as well as any security updates that have been made to the base image. From a49ac63983188c7eadebfb69c131ae74d401e586 Mon Sep 17 00:00:00 2001 From: De Wet Blomerus Date: Mon, 3 Jun 2019 17:43:13 +0200 Subject: [PATCH 41/43] Restart Kafka when restarting Docker --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 30ad6c4c..b4f77b38 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: image: wurstmeister/zookeeper ports: - "2181:2181" + restart: unless-stopped + kafka: build: . ports: @@ -14,3 +16,4 @@ services: KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 volumes: - /var/run/docker.sock:/var/run/docker.sock + restart: unless-stopped From 9efdf103f44cff2f1e57089aafb519a863dca60d Mon Sep 17 00:00:00 2001 From: jimbogithub Date: Wed, 11 May 2022 21:27:33 +1200 Subject: [PATCH 42/43] Switch from Alpine to Debian to get newer multi-arch JRE (#703) * Switch from Alpine to Debian to get newer multi-arch JRE. * Log raw topic info during CI build. * Revised 'compact/snappy' config check. Deal with output spacing variability. * Drop support for kafka 2.0.1 * Update CHANGELOG. Co-authored-by: Andrei Sfat --- .travis.yml | 2 -- CHANGELOG.md | 6 ++++ Dockerfile | 50 ++++++++++++++++++--------- download-kafka.sh | 6 ++-- test/0.10/test.create-topics.kafka.sh | 4 +-- 5 files changed, 44 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0700111d..04fe8439 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,6 @@ env: # Build recommended versions based on: http://kafka.apache.org/downloads matrix: include: - - scala: 2.12 - env: KAFKA_VERSION=2.0.1 - scala: 2.12 env: KAFKA_VERSION=2.1.1 - scala: 2.12 diff --git a/CHANGELOG.md b/CHANGELOG.md index eec33e1a..d4ed2cf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog Kafka features are not tied to a specific kafka-docker version (ideally all changes will be merged into all branches). Therefore, this changelog will track changes to the image by date. +09-Apr-2022 +---------- + +- Switched to openjdk:11-jre-slim for multi-arch support. +- Drop support for Kafka `2.0.1` due to JDK upgrade. + 04-Oct-2021 ---------- diff --git a/Dockerfile b/Dockerfile index a6bfb3d9..6983799c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ -FROM azul/zulu-openjdk-alpine:8u292-8.54.0.21 +FROM openjdk:11-jre-slim ARG kafka_version=2.8.1 ARG scala_version=2.13 -ARG glibc_version=2.31-r0 ARG vcs_ref=unspecified ARG build_date=unspecified @@ -17,24 +16,41 @@ LABEL org.label-schema.name="kafka" \ ENV KAFKA_VERSION=$kafka_version \ SCALA_VERSION=$scala_version \ - KAFKA_HOME=/opt/kafka \ - GLIBC_VERSION=$glibc_version + KAFKA_HOME=/opt/kafka ENV PATH=${PATH}:${KAFKA_HOME}/bin -COPY download-kafka.sh start-kafka.sh broker-list.sh create-topics.sh versions.sh /tmp/ - -RUN apk add --no-cache bash curl jq docker \ - && chmod a+x /tmp/*.sh \ - && mv /tmp/start-kafka.sh /tmp/broker-list.sh /tmp/create-topics.sh /tmp/versions.sh /usr/bin \ - && sync && /tmp/download-kafka.sh \ - && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt \ - && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz \ - && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} ${KAFKA_HOME} \ - && rm /tmp/* \ - && wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \ - && apk add --no-cache --allow-untrusted glibc-${GLIBC_VERSION}.apk \ - && rm glibc-${GLIBC_VERSION}.apk +COPY download-kafka.sh start-kafka.sh broker-list.sh create-topics.sh versions.sh /tmp2/ + +RUN set -eux ; \ + apt-get update ; \ + apt-get upgrade -s ; \ + apt-get install -y --no-install-recommends jq net-tools curl wget ; \ +### BEGIN docker for CI tests + apt-get install -y --no-install-recommends gnupg lsb-release ; \ + curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ; \ + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ + $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null ; \ + apt-get update ; \ + apt-get install -y --no-install-recommends docker-ce-cli ; \ + apt remove -y gnupg lsb-release ; \ + apt clean ; \ + apt autoremove -y ; \ + apt -f install ; \ +### END docker for CI tests +### BEGIN other for CI tests + apt-get install -y --no-install-recommends netcat ; \ +### END other for CI tests + chmod a+x /tmp2/*.sh ; \ + mv /tmp2/start-kafka.sh /tmp2/broker-list.sh /tmp2/create-topics.sh /tmp2/versions.sh /usr/bin ; \ + sync ; \ + /tmp2/download-kafka.sh ; \ + tar xfz /tmp2/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt ; \ + rm /tmp2/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz ; \ + ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} ${KAFKA_HOME} ; \ + rm -rf /tmp2 ; \ + rm -rf /var/lib/apt/lists/* COPY overrides /opt/overrides diff --git a/download-kafka.sh b/download-kafka.sh index 746ef93f..58520243 100755 --- a/download-kafka.sh +++ b/download-kafka.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # shellcheck disable=SC1091 -source "/usr/bin/versions.sh" +. "/usr/bin/versions.sh" FILENAME="kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz" @@ -9,10 +9,10 @@ url=$(curl --stderr /dev/null "https://www.apache.org/dyn/closer.cgi?path=/kafka # Test to see if the suggested mirror has this version, currently pre 2.1.1 versions # do not appear to be actively mirrored. This may also be useful if closer.cgi is down. -if [[ ! $(curl -f -s -r 0-1 "${url}") ]]; then +if [ ! "$(curl -f -s -r 0-1 "${url}")" ]; then echo "Mirror does not have desired version, downloading direct from Apache" url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/${FILENAME}" fi echo "Downloading Kafka from $url" -wget "${url}" -O "/tmp/${FILENAME}" +wget "${url}" -O "/tmp2/${FILENAME}" diff --git a/test/0.10/test.create-topics.kafka.sh b/test/0.10/test.create-topics.kafka.sh index e9dda7bd..b318512f 100755 --- a/test/0.10/test.create-topics.kafka.sh +++ b/test/0.10/test.create-topics.kafka.sh @@ -11,7 +11,7 @@ testCreateTopics() { CLEANUP[0]="" TOPICS[1]="compact-$NOW" - CLEANUP[1]="compact,compression.type=snappy" + CLEANUP[1]="compression.type=snappy,cleanup.policy=compact" KAFKA_CREATE_TOPICS="${TOPICS[0]}:1:1,${TOPICS[1]}:2:1:compact --config=compression.type=snappy" create-topics.sh @@ -22,7 +22,7 @@ testCreateTopics() { echo "Validating topic '$TOPIC'" EXISTS=$(/opt/kafka/bin/kafka-topics.sh --zookeeper "$KAFKA_ZOOKEEPER_CONNECT" --list --topic "$TOPIC") - POLICY=$(/opt/kafka/bin/kafka-configs.sh --zookeeper "$KAFKA_ZOOKEEPER_CONNECT" --entity-type topics --entity-name "$TOPIC" --describe | grep 'Configs for topic' | awk -F'cleanup.policy=' '{print $2}') + POLICY=$(/opt/kafka/bin/kafka-topics.sh --zookeeper "$KAFKA_ZOOKEEPER_CONNECT" --describe --topic "$TOPIC" | awk -F'Configs:' '{print $2}' | xargs) RESULT="$EXISTS:$POLICY" EXPECTED="$TOPIC:${CLEANUP[i]}" From 901c084811fa9395f00af3c51e0ac6c32c697034 Mon Sep 17 00:00:00 2001 From: azieseme <80332010+azieseme@users.noreply.github.com> Date: Sat, 28 May 2022 10:02:49 +0200 Subject: [PATCH 43/43] Dockerfile - apply apt upgrade, not just simulate (#711) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6983799c..49668583 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ COPY download-kafka.sh start-kafka.sh broker-list.sh create-topics.sh versions.s RUN set -eux ; \ apt-get update ; \ - apt-get upgrade -s ; \ + apt-get upgrade -y ; \ apt-get install -y --no-install-recommends jq net-tools curl wget ; \ ### BEGIN docker for CI tests apt-get install -y --no-install-recommends gnupg lsb-release ; \