instruction: Create a Dockerfile for Node.js with production best practices
output: ```dockerfile
  from both containers and native appsUnderstanding Kafka listenersDefining the listenersAdding cluster visualizationTesting with KafkaConclusionWith the rise of microservices, event-driven architectures have become increasingly popular.
  Apache Kafka, a distributed event streaming platform, is often at the
  heart of these architectures. Unfortunately, setting up and deploying your own Kafka instance for development
  is often tricky. Fortunately, Docker and containers make this much easier.In this guide, you will learn how to:Use Docker to launch up a Kafka clusterConnect a non-containerized app to the clusterConnect a containerized app to the clusterDeploy Kafka-UI to help with troubleshooting and debuggingPrerequisitesThe following prerequisites are required to follow along with this how-to guide:Docker DesktopNode.js and yarnBasic knowledge of Kafka and DockerLaunching KafkaBeginning with Kafka 3.3, the deployment of Kafka was greatly simplified by no longer requiring Zookeeper thanks to KRaft (Kafka Raft). With KRaft, setting up a Kafka instance for local development is much easier. Starting with the launch of Kafka 3.8, a new kafka-native Docker image is now available, providing a significantly faster startup and lower memory footprint.
  TipThis guide will be using the apache/kafka image, as it includes many helpful scripts to manage and work with Kafka. However, you may want to use the apache/kafka-native image, as it starts more quickly and requires fewer resources.Starting KafkaStart a basic Kafka cluster by doing the following steps. This example will launch a cluster, exposing port 9092 onto the host to let a native-running application to connect to it.Start a Kafka container by running the following command:
  
  $ docker run -d --name=kafka -p 9092:9092 apache/kafka
  Once the image pulls, youâll have a Kafka instance up and running within a second or two.The apache/kafka image ships with several helpful scripts in the /opt/kafka/bin directory. Run the following command to verify the cluster is up and running and get its cluster ID:
  
  $ docker exec -ti kafka /opt/kafka/bin/kafka-cluster.sh cluster-id --bootstrap-server :9092
  Doing so will produce output similar to the following:
  
  Cluster ID: 5L6g3nShT-eMCtK--X86swCreate a sample topic and produce (or publish) a few messages by running the following command:
  
  $ docker exec -ti kafka /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server :9092 --topic demo
  After running, you can enter a message per line. For example, enter a few messages, one per line. A few examples might be:
  
  First messageAnd
  
  Second messagePress enter to send the last message and then press ctrl+c when youâre done. The messages will be published to Kafka.Confirm the messages were published into the cluster by consuming the messages:
  
  $ docker exec -ti kafka /opt/kafka/bin/kafka-console-consumer.sh --bootstrap-server :9092 --topic demo --
  ```