This is unrelated to Docker itself. It's tied to a template file within the Kafka image provided by Confluent: kafka.properties.template. This template is processed by the configure script when the container starts, where the env variables are actually used to build the configuration (kafka.properties) file before starting Kafka itself.