Skip to content

Commit 58f7b34

Browse files
committed
change boot2docker command to docker-machine
1 parent fff7671 commit 58f7b34

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ Run
1919
---
2020

2121
```bash
22-
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=`boot2docker ip` --env ADVERTISED_PORT=9092 spotify/kafka
22+
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` --env ADVERTISED_PORT=9092 spotify/kafka
2323
```
2424

2525
```bash
26-
export KAFKA=`boot2docker ip`:9092
26+
export KAFKA=`docker-machine ip \`docker-machine active\``:9092
2727
kafka-console-producer.sh --broker-list $KAFKA --topic test
2828
```
2929

3030
```bash
31-
export ZOOKEEPER=`boot2docker ip`:2181
31+
export ZOOKEEPER=`docker-machine ip \`docker-machine active\``:2181
3232
kafka-console-consumer.sh --zookeeper $ZOOKEEPER --topic test
3333
```
3434

kafka/scripts/start-kafka.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# Optional ENV variables:
4-
# * ADVERTISED_HOST: the external ip for the container, e.g. `boot2docker ip`
4+
# * ADVERTISED_HOST: the external ip for the container, e.g. `docker-machine ip \`docker-machine active\``
55
# * ADVERTISED_PORT: the external port for Kafka, e.g. 9092
66
# * ZK_CHROOT: the zookeeper chroot that's used by Kafka (without / prefix), e.g. "kafka"
77
# * LOG_RETENTION_HOURS: the minimum age of a log file in hours to be eligible for deletion (default is 168, for 1 week)

0 commit comments

Comments
 (0)