Skip to content

Commit

Permalink
avoid using file mounting in Kafka (useful when you run tests against…
Browse files Browse the repository at this point in the history
… a remote Docker engine) (#775)
  • Loading branch information
bsideup committed Jul 10, 2018
1 parent 5b4d0ee commit ea500c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,14 @@ protected void doStart() {
} else {
addExposedPort(ZOOKEEPER_PORT);
withEnv("KAFKA_ZOOKEEPER_CONNECT", "localhost:2181");
withClasspathResourceMapping("tc-zookeeper.properties", "/zookeeper.properties", BindMode.READ_ONLY);
withCommand("sh", "-c", "zookeeper-server-start /zookeeper.properties & /etc/confluent/docker/run");
withCommand(
"sh",
"-c",
// Use command to create the file to avoid file mounting (useful when you run your tests against a remote Docker daemon)
"printf 'clientPort=2181\ndataDir=/var/lib/zookeeper/data\ndataLogDir=/var/lib/zookeeper/log' > /zookeeper.properties" +
" && zookeeper-server-start /zookeeper.properties" +
" & /etc/confluent/docker/run"
);
}

super.doStart();
Expand Down
3 changes: 0 additions & 3 deletions modules/kafka/src/main/resources/tc-zookeeper.properties

This file was deleted.

0 comments on commit ea500c6

Please sign in to comment.