31z4 / zookeeper-docker

Docker image packaging for Apache Zookeeper
MIT License
285 stars 243 forks source link

add admin.serverPort option for host network mode #108

Closed hozumi closed 4 years ago

hozumi commented 4 years ago

Expected behavior

When running docker image as --net=host , it is helpful if the docker image has a way to specify admin.serverPort ,which is 8080 by default, by passing value via environment variable in order to avoid port collision.

Actual behavior

Currently there is no option to specify admin.serverPort parameter. So if 8080 port is used by another program, users must set false to admin.enableServer in case of --net=host mode.

31z4 commented 4 years ago

I believe you can use ZOO_CFG_EXTRA for that. See https://hub.docker.com/_/zookeeper/

image

So it would be docker run -e ZOO_CFG_EXTRA="admin.serverPort=1234" zookeeper.

hozumi commented 4 years ago

@31z4 I missed that parameter. Thank you for your answer!