# bigdata-docker **Repository Path**: wqp0010/bigdata-docker ## Basic Information - **Project Name**: bigdata-docker - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-09-10 - **Last Updated**: 2021-12-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### bigdata-docker #### 一 介绍 build大数据相关服务Docker镜像 #### 二 hadoop ##### 1.构建镜像 ```bash docker build -t hadoop:3.3.1 . ``` ##### 2.生产一个namenode一个datanode的集群 ```bash docker-compose up ``` ##### 3.访问页面 通过浏览器访问
NameNode
http://localhost:50070/
DataNode
http://localhost:50075/datanode.html #### 三 Spark ##### 1.构建镜像 ```bash docker build -t spark:3.0.1 . ``` ##### 2.生产一个master两个worker的集群 ```bash docker-compose up ``` ##### 3.访问页面 通过浏览器访问
NameNode
http://localhost:50070/
DataNode
http://localhost:50075/datanode.html #### 四 airflow ##### 1.创建运行环境 ```bash mkdir ./dags ./logs ./plugins echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env ``` ##### 2.数据迁移/创建新用户 ```bash docker-compose up airflow-init ``` ##### 3.启动airflow ```bash docker-compose up ``` ##### 4.airflow交互 ###### 4.1 使用命令行 安装包装脚本 ```bash curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.1.0/airflow.sh' chmod +x airflow.sh ``` 运行命令 ```bash ./airflow.sh info ``` 交互命令 ```bash ./airflow.sh bash ./airflow.sh python ``` ###### 4.2 使用网页 打开网页http://localhost:8080
airflow/airflow #### 五 hbase-hdfs ##### 1.构建镜像 ```bash docker build -t qpwu/hbase:2.4.8 . ``` 端口映射说明 ```bash hbase.master.port Description The port the HBase Master should bind to. Default 16000 hbase.master.info.port Description The port for the HBase Master web UI. Set to -1 if you do not want a UI instance run. Default 16010 hbase.regionserver.port Description The port the HBase RegionServer binds to. Default 16020 ``` ##### 2.启动单点镜像 ```bash docker run -d -h docker-hbase -p 12181:2181 -p 17000:17000 -p 17010:17010 -p 17020:17020 --name wu-base qpwu/hbase:2.4.8 ``` 启动后,则为hbase文件存储在hdfs模式 #### 六 hbase-disk ##### 1.构建镜像 ```bash docker build -t qpwu/hbase_pd:2.4.8 . ``` 端口映射说明 ```bash hbase.master.port Description The port the HBase Master should bind to. Default 16000 hbase.master.info.port Description The port for the HBase Master web UI. Set to -1 if you do not want a UI instance run. Default 16010 hbase.regionserver.port Description The port the HBase RegionServer binds to. Default 16020 hbase.regionserver.info.port Description The port for the HBase RegionServer web UI Set to -1 if you do not want the RegionServer UI to run. Default 16030 ``` ##### 2.本地磁盘模式 ```bash docker run -d -h docker-hbase -p 12181:2181 -p 18000:18000 -p 18010:18010 -p 18020:18020 --name wu-base-pd qpwu/hbase_pd:2.4.8 ``` 这个版本则为存储到本机磁盘的模式