Code Monkey home page Code Monkey logo

docker_bigdata's Introduction

注意

由于 git 不支持大文件, 所以一些安装包 push 不上去.请在下面的地址下载完整资料:

链接: https://pan.baidu.com/s/1c3GvHUxai5d-rozNE3BiaA 密码: i183

目录说明

  • 不要更改docker_bigdata及子目录的目录结构
  • 进入到docker_bigdata目录下再执行脚本

镜像构建说明

  • build_all.sh 可以构建需要用到的所有镜像, 运行的时候, 根据自己的需要选择需要构建的镜像
  • build_all.sh 最后会创建 3 个容器 hadoop162, hadoop163, hadoop164

容器启动说明

  • contains.sh 启动集群容器
  • 启动的时候会自动根据当前宿主机的 ip 进行配置
  • 3 个容器的 ip 分别是 xxx.162, xxx.163, xxx.164
  • xxx 是根据当前宿主的 ip 自动获取的

特别说明

  • 容器启动后, 需要配置 3 个容器之间的免密登录. 直接运行脚本即可:ssh_auto_copy.sh 不需要输入任何参数
  • 在运行脚本:ssh_auto_copy.sh的时候, 顺便也格式化了 namenode和给msyql更换了密码:aaaaaa
  • 容器一旦创建成功之后, 以后使用的时候启动即可
  • 启动 hadoop: hadoop.sh start
  • 启动 kafka: kafka.sh start
  • 启动 zookeeper: zk start
  • 启动 hbase: start-hbase.sh

docker_bigdata's People

Stargazers

Sophia Martinez avatar hellousworld avatar

Watchers

James Cloos avatar  avatar

docker_bigdata's Issues

老师,咱们这个构建会出错: 网上我看好像是说DockerFile的问题?

➜ bd_docker ./build_all.sh
是否删除旧的所有容器y/n: y

开始删除所有容器....
a3100eab3e6e
ccd227072a1d
3c221c494de6
049052ba693a
是否构建 java8y/n: y
开始构建镜像: java8
Sending build context to Docker daemon 3.584kB
Step 1/8 : FROM centos:7.5.1804
---> cf49811e3cdb
Step 2/8 : MAINTAINER atguigu_lzc ([email protected])
---> Running in 29f2246783fc
Removing intermediate container 29f2246783fc
---> 84977a095d97
Step 3/8 : RUN useradd atguigu && echo 'atguigu:aaaaaa' | chpasswd && mkdir -p /opt/software && mkdir -p /opt/module && chmod 777 /opt && chmod 777 /opt/module && chmod 777 /opt/software && echo 'root:aaaaaa' | chpasswd # 更改 root 用户登录密码为
---> Running in a745925169d4
Removing intermediate container a745925169d4
---> 4f8e3ba9d479
Step 4/8 : USER atguigu
---> Running in 39d20f72dd11
Removing intermediate container 39d20f72dd11
---> fe249e224c2e
Step 5/8 : COPY --chown=atguigu:atguigu jdk-8u212-linux-x64.tar.gz /opt/software/
---> 0c7fc87b666a
Step 6/8 : RUN tar -zxvf /opt/software/jdk-8u212-linux-x64.tar.gz -C /opt/module && rm -rf /opt/software/jdk-8u212-linux-x64.tar.gz && JAVA_HOME=/opt/module/jdk1.8.0_212
---> Running in a92fb287aaf9

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The command '/bin/sh -c tar -zxvf /opt/software/jdk-8u212-linux-x64.tar.gz -C /opt/module && rm -rf /opt/software/jdk-8u212-linux-x64.tar.gz && JAVA_HOME=/opt/module/jdk1.8.0_212' returned a non-zero code: 2
是否构建 sshy/n: y

开始构建镜像: ssh
Sending build context to Docker daemon 5.12kB
Step 1/14 : FROM atguigu_bigdata_java8:0.0.1
pull access denied for atguigu_bigdata_java8, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
是否构建 basey/n: y

开始构建镜像: base
Sending build context to Docker daemon 70.46MB
Step 1/46 : FROM atguigu_bigdata_ssh:0.0.1
pull access denied for atguigu_bigdata_ssh, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
是否构建 162 163 164y/n:

老师,咱们这个构建会出错: 网上我看好像是说DockerFile的问题?

➜ docker_bigdata l
total 72M
drwxrwxr-x 4 dev dev 4.0K May 18 15:33 __MACOSX
-rw-rw-r-- 1 dev dev 72M May 18 15:14 d.zip
drwxr-xr-x 7 dev dev 4.0K May 18 14:57 base
drwxr-xr-x 4 dev dev 4.0K May 18 14:57 hadoop162
-rwxr-xr-x 1 dev dev 3.2K Apr 28 20:25 build_all.sh
-rwxr-xr-x 1 dev dev 2.1K Apr 28 20:25 contains.sh
drwxr-xr-x 2 dev dev 4.0K Apr 28 20:25 hadoop163
drwxr-xr-x 2 dev dev 4.0K Apr 28 20:25 hadoop164
drwxr-xr-x 2 dev dev 4.0K Apr 28 20:25 java8
drwxr-xr-x 2 dev dev 4.0K Apr 28 20:25 ssh
-rw-r--r-- 1 dev dev 1.3K Apr 28 20:25 Readme.md

➜ docker_bigdata ./build_all.sh
是否删除旧的所有容器y/n: y

开始删除所有容器....
cb74f545822e
是否构建 java8y/n: y
开始构建镜像: java8
Sending build context to Docker daemon 3.584kB
Step 1/8 : FROM centos:7.5.1804
---> cf49811e3cdb
Step 2/8 : MAINTAINER atguigu_lzc ([email protected])
---> Running in 28941fbabc5f
Removing intermediate container 28941fbabc5f
---> 151a090c1faf
Step 3/8 : RUN useradd atguigu && echo 'atguigu:aaaaaa' | chpasswd && mkdir -p /opt/software && mkdir -p /opt/module && chmod 777 /opt && chmod 777 /opt/module && chmod 777 /opt/software && echo 'root:aaaaaa' | chpasswd # 更改 root 用户登录密码为
---> Running in d189d1128559
Removing intermediate container d189d1128559
---> 70c077224563
Step 4/8 : USER atguigu
---> Running in b46634640154
Removing intermediate container b46634640154
---> 0061a255f7b7
Step 5/8 : COPY --chown=atguigu:atguigu jdk-8u212-linux-x64.tar.gz /opt/software/
---> ac0f38cfb93b
Step 6/8 : RUN tar -zxvf /opt/software/jdk-8u212-linux-x64.tar.gz -C /opt/module && rm -rf /opt/software/jdk-8u212-linux-x64.tar.gz && JAVA_HOME=/opt/module/jdk1.8.0_212
---> Running in d6a40cce98e8

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The command '/bin/sh -c tar -zxvf /opt/software/jdk-8u212-linux-x64.tar.gz -C /opt/module && rm -rf /opt/software/jdk-8u212-linux-x64.tar.gz && JAVA_HOME=/opt/module/jdk1.8.0_212' returned a non-zero code: 2
是否构建 sshy/n: y

开始构建镜像: ssh
Sending build context to Docker daemon 5.12kB
Step 1/14 : FROM atguigu_bigdata_java8:0.0.1
pull access denied for atguigu_bigdata_java8, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
是否构建 basey/n: y

开始构建镜像: base
Sending build context to Docker daemon 70.46MB
Step 1/46 : FROM atguigu_bigdata_ssh:0.0.1
pull access denied for atguigu_bigdata_ssh, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
是否构建 162 163 164y/n: y

开始构建镜像 atguigu_bigdata_162
Sending build context to Docker daemon 4.622MB
Step 1/8 : FROM atguigu_bigdata_base:0.0.1
pull access denied for atguigu_bigdata_base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

开始构建镜像 atguigu_bigdata_163
Sending build context to Docker daemon 2.56kB
Step 1/5 : FROM atguigu_bigdata_base:0.0.1
pull access denied for atguigu_bigdata_base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

开始构建镜像 atguigu_bigdata_164
Sending build context to Docker daemon 2.56kB
Step 1/5 : FROM atguigu_bigdata_base:0.0.1
pull access denied for atguigu_bigdata_base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Deleted: sha256:ac0f38cfb93b8c504bbb01395de4141340e69d0fb971a1411c648c2bb9f77065
Deleted: sha256:0061a255f7b7af5e4b92ea5422bd6141cc579d8a88ad2a0423c6591b13f2076b
Deleted: sha256:70c077224563c9a5acb652d4d4105cd51e81870e3ec451214eeb7910462cfb83
Deleted: sha256:151a090c1faf080ca1e4aa1738cc8ef670a92b2cea30f483117eb3eb98cd9862

创建集群容器: hadoop162
Unable to find image 'atguigu_bigdata_162:0.0.1' locally
Error response from daemon: pull access denied for atguigu_bigdata_162, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

创建集群容器: hadoop163
Unable to find image 'atguigu_bigdata_163:0.0.1' locally
Error response from daemon: pull access denied for atguigu_bigdata_163, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

创建集群容器: hadoop164
Unable to find image 'atguigu_bigdata_164:0.0.1' locally
Error response from daemon: pull access denied for atguigu_bigdata_164, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
➜ docker_bigdata

(还把我docker的镜像给删了。我以为只删除咱们这个项目创建的容器呢。。)

上面是全过程的log,咱们这个是什么问题呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.