This is an automated email from the ASF dual-hosted git repository.

merlimat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new f638a892d58 [fix][misc] Update docker image guide and version scripts 
(#25930)
f638a892d58 is described below

commit f638a892d58832e366a2962dd09b496d6e0e42f6
Author: Philipp Dolif <[email protected]>
AuthorDate: Thu Jun 4 15:08:16 2026 +0200

    [fix][misc] Update docker image guide and version scripts (#25930)
---
 README.md                  |  8 +++-----
 docker/README.md           | 47 +++++-----------------------------------------
 docker/get-version.sh      | 25 +-----------------------
 src/get-pulsar-version.sh  |  2 +-
 src/set-project-version.sh | 10 +++++-----
 5 files changed, 15 insertions(+), 77 deletions(-)

diff --git a/README.md b/README.md
index dae2d2fe263..bff6e32ecd3 100644
--- a/README.md
+++ b/README.md
@@ -212,13 +212,13 @@ Here are some general instructions for building custom 
docker images:
 
 * Java 21 is the recommended JDK version since `branch-4.0`.
 
-The following command builds the docker images 
`apachepulsar/pulsar-all:latest` and `apachepulsar/pulsar:latest`:
+The following command builds the docker image `apachepulsar/pulsar:latest`:
 
 ```bash
-./gradlew docker-all
+./gradlew docker
 ```
 
-After the images are built, they can be tagged and pushed to your custom 
repository. Here's an example of a bash script that tags the docker images with 
the current version and git revision and pushes them to 
`localhost:32000/apachepulsar`.
+After the image is built, it can be tagged and pushed to your custom 
repository. Here's an example of a bash script that tags the docker image with 
the current version and git revision and pushes it to 
`localhost:32000/apachepulsar`.
 
 ```bash
 image_repo_and_project=localhost:32000/apachepulsar
@@ -226,8 +226,6 @@ pulsar_version=$(src/get-pulsar-version.sh)
 gitrev=$(git rev-parse HEAD | colrm 10)
 tag="${pulsar_version}-${gitrev}"
 echo "Using tag $tag"
-docker tag apachepulsar/pulsar-all:latest 
${image_repo_and_project}/pulsar-all:$tag
-docker push ${image_repo_and_project}/pulsar-all:$tag
 docker tag apachepulsar/pulsar:latest ${image_repo_and_project}/pulsar:$tag
 docker push ${image_repo_and_project}/pulsar:$tag
 ```
diff --git a/docker/README.md b/docker/README.md
index 733384c6852..9de89fd7e5f 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -21,10 +21,7 @@
 
 # Apache Pulsar Docker Images
 
-The Apache Pulsar community produces 2 docker images with each official 
release.
-
-* `apachepulsar/pulsar` - contains the necessary components for a working 
Pulsar cluster
-* `apachepulsar/pulsar-all` - extends the `apachepulsar/pulsar` image by 
adding many Pulsar connectors and offloaders
+The Apache Pulsar community produces the `apachepulsar/pulsar` docker image 
with each official release.
 
 Since the 2.10.0 release, these docker images run as an unnamed, non-root user 
that is also part of the root group, by
 default. This was done to increase container security. The user is part of the 
root group to ensure that the container
@@ -32,48 +29,14 @@ image can easily run on OpenShift and to ensure that the 
Pulsar process can writ
 
 ## Development
 
-You can build and test these docker images on your own machine by running the 
`./build.sh` script in this directory.
+You can build and test the docker image on your own machine by running the 
`./build.sh` script in this directory.
 Note that you first must build the project in order to have the right 
dependencies in your local environment.
 
 ## Building Derivative Custom Images
 
-If you find the `apachepulsar/pulsar-all` docker image too large, but you want 
to use a connector or an offloader,
-you can easily build an image with a curated list of connectors or offloaders 
based on the official Apache Pulsar
-images. You can use the following sample docker image as a guide:
-
-```Dockerfile
-ARG VERSION
-
-# Load the pulsar-all image as a builder image
-FROM apachepulsar/pulsar-all:${VERSION} as pulsar-all
-
-FROM apachepulsar/pulsar:${VERSION}
-
-# Add the cassandra connector (also works with ScyllaDB)
-COPY --from=pulsar-all /pulsar/connectors/pulsar-io-cassandra-*.nar 
/pulsar/connectors
-
-# Add the jcloud offloader
-COPY --from=pulsar-all /pulsar/connectors/tiered-storage-jcloud-*.nar 
/pulsar/offloaders
-```
-
-NOTE: the above example uses a wildcard in the `COPY` commands because 
argument expansion does not work for `COPY`.
-
-Assuming that you have the above `Dockerfile` in your local directory and are 
running docker on your local host, you can
-run the following command to build a custom image with the cassandra connector 
and the jcloud offloader. The cassandra connector is compatible with both 
Apache Cassandra and ScyllaDB.
-
-```shell
-docker build --build-arg VERSION=2.9.1 -t pulsar-custom:2.9.1 .
-```
-
-For reference, here are the sizes of the official 2.9.1 docker images and the 
custom image built from the above
-`Dockerfile`:
-
-| REPOSITORY              | TAG   | SIZE   |
-| :---------------------- | :---- | :----- |
-| apachepulsar/pulsar     | 2.9.1 | 1.59GB |
-| apachepulsar/pulsar-all | 2.9.1 | 3.44GB |
-| pulsar-custom           | 2.9.1 | 1.6GB  |
-
+If you want to use a connector, you can easily build an image with a curated 
list of connectors based on the official
+Apache Pulsar image. For more information please see the 
+[Pulsar Connectors](https://github.com/apache/pulsar-connectors) repository.
 
 ## Troubleshooting non-root containers
 
diff --git a/docker/get-version.sh b/docker/get-version.sh
deleted file mode 100755
index 49003fea85d..00000000000
--- a/docker/get-version.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. >/dev/null 2>&1 && pwd )"
-
-# Get the project version from the version catalog
-grep -oP '^pulsar = "\K[^"]+' "$ROOT_DIR/gradle/libs.versions.toml"
diff --git a/docker/get-version.sh b/docker/get-version.sh
new file mode 120000
index 00000000000..e10a03af35c
--- /dev/null
+++ b/docker/get-version.sh
@@ -0,0 +1 @@
+../src/get-pulsar-version.sh
\ No newline at end of file
diff --git a/src/get-pulsar-version.sh b/src/get-pulsar-version.sh
index 7bcb37855d1..55a0432d3fd 100755
--- a/src/get-pulsar-version.sh
+++ b/src/get-pulsar-version.sh
@@ -21,4 +21,4 @@
 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 TOP_LEVEL_DIR="$(dirname "$SCRIPT_DIR")"
 
-grep "^pulsar " "$TOP_LEVEL_DIR/gradle/libs.versions.toml" | sed 's/.*= *"//' 
| sed 's/"//'
+grep '^version[[:space:]]*=' "$TOP_LEVEL_DIR/gradle.properties" | sed 
's/^version[[:space:]]*=[[:space:]]*//'
diff --git a/src/set-project-version.sh b/src/set-project-version.sh
index 80f6ea9b9ff..5b724b85002 100755
--- a/src/set-project-version.sh
+++ b/src/set-project-version.sh
@@ -28,18 +28,18 @@ fi
 NEW_VERSION=$1
 
 # Go to top level project directory
-SRC_DIR=$(dirname "$0")
+SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 ROOT_DIR=$(cd "${SRC_DIR}/.."; pwd)
 TERRAFORM_DIR=${ROOT_DIR}/deployment/terraform-ansible
 pushd ${ROOT_DIR}
 
-# Get the current version from the version catalog
-OLD_VERSION=$(grep -oP '^pulsar = "\K[^"]+' gradle/libs.versions.toml)
+# Get the current version from the gradle properties
+OLD_VERSION=$("$SRC_DIR/get-pulsar-version.sh")
 
 echo "Changing version from $OLD_VERSION to $NEW_VERSION"
 
-# Update the version catalog (single source of truth)
-sed -i "s/^pulsar = \"${OLD_VERSION}\"/pulsar = \"${NEW_VERSION}\"/" 
gradle/libs.versions.toml
+# Update the gradle properties (single source of truth)
+sed -i "s/^version[[:space:]]*=[[:space:]]*.*/version=${NEW_VERSION}/" 
"$ROOT_DIR/gradle.properties"
 
 # Set terraform ansible deployment pulsar version
 if [ -f "${TERRAFORM_DIR}/deploy-pulsar.yaml" ]; then

Reply via email to