代码拉取完成,页面将自动刷新
#!/bin/bash
set -e
N=${1:-3}
CURRENT_DIR=$(dirname $(readlink -f "$0"))
HADOOP_VERSION=3.3.2
if [ ! -f "$CURRENT_DIR/assets/hadoop.tar.gz" ]; then
echo "No hadoop archive found at $CURRENT_DIR/assets/hadoop.tar.gz"
echo "Start Downloading."
wget -O $CURRENT_DIR/assets/hadoop.tar.gz \
https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz
echo "Dowloading Finshed."
fi
echo "Start building hadoop with ${N} subnode."
i=1
rm assets/hadoop/workers
while [ $i -le $N ]
do
echo "hadoop-worker$i" >> assets/hadoop/workers
((i++))
done
docker build -t forevercyril/hadoop:$N-node-v0.1 .
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。