ooraini / testcontainers-hdfs

Docker container image for Hadoop HDFS mini cluster, and a testcontainers libray API for using it
MIT License
3 stars 1 forks source link

Docker image does not work on MacOS due to host networking mode #1

Open redsk opened 2 years ago

redsk commented 2 years ago

Host networking mode is not supported in OS other than Linux.

Could you expose the ports instead? If the mini cluster is created as:

final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf, dataFile)
            .nameNodePort(9000)          // <- set static port
            .manageNameDfsDirs(true)
            .manageDataDfsDirs(true)
            .format(true)
            .build();

Then we'd need to expose the ports instead of using host networking mode. WDYT?

ooraini commented 2 years ago

I haven't worked on this for a while. When initially working on this I faced issues when not using host networking. If you can get it working, feel free to submit a PR.