showuon commented on code in PR #17894: URL: https://github.com/apache/kafka/pull/17894#discussion_r1856536974
########## docker/examples/README.md: ########## @@ -4,58 +4,61 @@ Kafka Docker Image Usage Guide Introduction ------------ -This document contains usage guide as well as examples for docker image. Docker compose files are provided in this directory for the example use cases. +This document contains usage guide as well as examples for Docker image. +Docker Compose files are provided in this directory for the example use cases. + +Kafka server can be started using following ways: -Kafka server can be started using following ways:- Review Comment: Nice catch! ########## docker/examples/README.md: ########## @@ -4,58 +4,61 @@ Kafka Docker Image Usage Guide Introduction ------------ -This document contains usage guide as well as examples for docker image. Docker compose files are provided in this directory for the example use cases. +This document contains usage guide as well as examples for Docker image. +Docker Compose files are provided in this directory for the example use cases. + +Kafka server can be started using following ways: -Kafka server can be started using following ways:- - Default configs - File input - Environment variables Running on default configs -------------------------- -If no user provided configs are passed to docker container or configs provided are empty, default configs will be used (configs that are packaged in kafka tarball). If any user provided config is provided, default configs will not be used. +If no user provided configuration file is passed to the Docker container, or the file is empty, the default KRaft configuration for single combined-mode node will be used. +This default configuration is packaged in the Kafka tarball. +If any user provided config (file input or environment variables) is provided, the default configuration will not be used. Review Comment: I think we can combine L19 and L21 to sentence. ########## docker/examples/README.md: ########## @@ -4,58 +4,61 @@ Kafka Docker Image Usage Guide Introduction ------------ -This document contains usage guide as well as examples for docker image. Docker compose files are provided in this directory for the example use cases. +This document contains usage guide as well as examples for Docker image. +Docker Compose files are provided in this directory for the example use cases. + +Kafka server can be started using following ways: -Kafka server can be started using following ways:- - Default configs - File input - Environment variables Running on default configs -------------------------- -If no user provided configs are passed to docker container or configs provided are empty, default configs will be used (configs that are packaged in kafka tarball). If any user provided config is provided, default configs will not be used. +If no user provided configuration file is passed to the Docker container, or the file is empty, the default KRaft configuration for single combined-mode node will be used. +This default configuration is packaged in the Kafka tarball. +If any user provided config (file input or environment variables) is provided, the default configuration will not be used. -Use file input for providing configs +Use input file for providing configs ------------------------------------ -- This method requires users to provide path to a local folder which contains kafka property files and mount it to docker container using docker volume. -- It replaces the default config file present in docker container. -- Mount the folder containing kafka property files to `/mnt/shared/config` in docker container. -- Command `docker run --volume path/to/property/folder:/mnt/shared/config -p 9092:9092 apache/kafka:latest` can be used to mount the folder containing property files. -- Property files will be only read by the docker container. +- This method requires users to provide path to a local folder which contains the Kafka property files and mount it to Docker container using Docker volume. +- It replaces the default KRaft configuration file present in Docker container. +- The Command `docker run --volume /path/to/property/folder:/mnt/shared/config -p 9092:9092 apache/kafka:latest` can be used to mount the folder containing the property files. +- Property files will be only read by the Docker container. Using Environment Variables --------------------------- -- Kafka property defined via env variables will override the value of that property defined in file input and default config. -- If properties are provided via environment variables only, default configs will be replaced by user provided properties. -- To construct the environment key variable name for server.properties configs, following steps can be followed:- - - Replace . with _ - - Replace _ with __(double underscore) - - Replace - with ___(triple underscore) - - Prefix the result with KAFKA_ +One limitation of the environment variables approach it that you need to set all properties required to start the KRaft node. Review Comment: I don't think we should call it as "limitation", maybe: `Note: when using the environment variables approach it that you need to set all properties required to start the KRaft node.` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
