命令

docker run -ti -v /data/soft/namenode:/root/soft/apache/hadoop/hadoop-2.7.7/namenode  -v /data/soft/datanode:/root/soft/apache/hadoop/hadoop-2.7.7/datanode -h master ubuntu:spark

docker run -ti -v /data/soft/namenode:/root/soft/apache/hadoop/hadoop-2.7.7/namenode  -v /data/soft/datanode:/root/soft/apache/hadoop/hadoop-2.7.7/datanode -h slave1 ubuntu:spark

docker run -ti -v /data/soft/namenode:/root/soft/apache/hadoop/hadoop-2.7.7/namenode  -v /data/soft/datanode:/root/soft/apache/hadoop/hadoop-2.7.7/datanode -h slave2 ubuntu:spark

/data/soft/datanode /data/soft/namenode

./root/soft/shell/run_master.sh ./root/soft/shell/run_slave1.sh ./root/soft/shell/run_slave2.sh

docker run -ti -h master ubuntu:spark docker run -ti -h slave1 ubuntu:spark docker run -ti -h slave2 ubuntu:spark

hadoop namenode -format

Docker

docker cp /root/test.txt ecef8319d2c8:/root/

References

  1. 从0开始使用Docker搭建Spark集群
  2. docker-spark