最近因为要维护公司zk环境,所以自己先得搞一套先玩玩

git地址=>https://github.com/jplock/docker-zookeeper/tree/v3.4.9

一、build docker镜像

Usage: docker build [OPTIONS] PATH | URL | -

Options:
           --build-arg list Set build-time variables (default [])

arun:002_zookeeper arunyang$ git clone https://github.com/jplock/docker-zookeeper.git
Cloning into 'docker-zookeeper'...
remote: Counting objects: 79, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 79 (delta 0), reused 0 (delta 0), pack-reused 75
Unpacking objects: 100% (79/79), done.
arun:docker-zookeeper arunyang$ cat README.md
docker-zookeeper
================ Builds a docker image for Zookeeper. ```docker build -t <user>/zookeeper:3.4.9 .```
arun:docker-zookeeper arunyang$ docker build -t <user>/zookeeper:3.4.9 .
-bash: user: No such file or directory
arun:docker-zookeeper arunyang$ docker build -t arun/zookeeper:3.4.9 .
Sending build context to Docker daemon 7.68 kB
Step 1/11 : FROM openjdk:8-jre-alpine
8-jre-alpine: Pulling from library/openjdk
627beaf3eaaf: Pull complete
1de20f2d8b83: Pull complete
74e619d34827: Pull complete
Digest: sha256:e663151c5fdfa89bda49af65b3d477fa1433491290cd35c8f09afa16072f35c4
Status: Downloaded newer image for openjdk:8-jre-alpine
---> c017141bdaa8
Step 2/11 : MAINTAINER Justin Plock <justin@plock.net>
---> Running in 0c6d951e6686
---> a80c42d6b47c
Removing intermediate container 0c6d951e6686
Step 3/11 : ARG MIRROR=http://apache.mirrors.pair.com
---> Running in 79b00a581ec5
---> 7069c8b9d812
Removing intermediate container 79b00a581ec5
Step 4/11 : ARG VERSION=3.4.9
---> Running in fe262a6f03e7
---> 3b2f45ffc932
Removing intermediate container fe262a6f03e7
Step 5/11 : LABEL name "zookeeper" version $VERSION
---> Running in fb4297ebe9bf
---> 533f4472522f
Removing intermediate container fb4297ebe9bf
Step 6/11 : RUN apk add --no-cache wget bash && mkdir /opt && wget -q -O - $MIRROR/zookeeper/zookeeper-$VERSION/zookeeper-$VERSION.tar.gz | tar -xzf - -C /opt && mv /opt/zookeeper-$VERSION /opt/zookeeper && cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg && mkdir -p /tmp/zookeeper
---> Running in 35d326ef0126
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/6) Installing ncurses-terminfo-base (6.0-r7)
(2/6) Installing ncurses-terminfo (6.0-r7)
(3/6) Installing ncurses-libs (6.0-r7)
(4/6) Installing readline (6.3.008-r4)
(5/6) Installing bash (4.3.46-r5)
Executing bash-4.3.46-r5.post-install
(6/6) Installing wget (1.18-r2)
Executing busybox-1.25.1-r0.trigger
OK: 89 MiB in 55 packages
---> 399aab441ac7
Removing intermediate container 35d326ef0126
Step 7/11 : EXPOSE 2181 2888 3888
---> Running in 08ae7c0f32f5
---> 79b92b864d83
Removing intermediate container 08ae7c0f32f5
Step 8/11 : WORKDIR /opt/zookeeper
---> d99beccfa087
Removing intermediate container 699022bd0800
Step 9/11 : VOLUME /opt/zookeeper/conf /tmp/zookeeper
---> Running in 2568c9b4be17
---> 6012fc53e116
Removing intermediate container 2568c9b4be17
Step 10/11 : ENTRYPOINT /opt/zookeeper/bin/zkServer.sh
---> Running in 8b3a643e1d3d
---> 8f21274fe1aa
Removing intermediate container 8b3a643e1d3d
Step 11/11 : CMD start-foreground
---> Running in df66c9cf7eae
---> d0fd8d6691cb
Removing intermediate container df66c9cf7eae
Successfully built d0fd8d6691cb

二、启动docker

arun:docker-zookeeper arunyang$ docker run -d --name ele_zookeeper arun/zookeeper:3.4.9
67426e7c0ce5f2753122eafb006fa65f307d21f8a7095b3f5578429bb161fc16

  

  

参考:

http://seanlook.com/2014/11/17/dockerfile-introduction/

http://www.cnblogs.com/coolworld/p/5486656.html

002_docker构建zookeeper环境的更多相关文章

  1. hadoop2.6.2+hbase+zookeeper环境搭建

    1.hadoop环境搭建,版本:2.6.2,参考:http://www.cnblogs.com/bookwed/p/5251393.html 启动服务:在master机器上,进入hadoop安装目录, ...

  2. ZooKeeper学习第四期---构建ZooKeeper应用

    一.配置服务 配置服务是分布式应用所需要的基本服务之一,它使集群中的机器可以共享配置信息中那些公共的部分.简单地说,ZooKeeper可以作为一个具有高可用性的配置存储器,允许分布式应用的参与者检索和 ...

  3. [转]云计算之hadoop、hive、hue、oozie、sqoop、hbase、zookeeper环境搭建及配置文件

     云计算之hadoop.hive.hue.oozie.sqoop.hbase.zookeeper环境搭建及配置文件已经托管到githubhttps://github.com/sxyx2008/clou ...

  4. zookeeper 环境搭建

    1.准备三台服务器 ip分别为:192.168.100.128.192.168.100.129.192.168.100.133 a.修改主机名称 vi /etc/sysconfig/network 修 ...

  5. Docke--Dockerfile 构建LNMP环境

    Dockerfile 构建nginx并结合php 1.构建基础镜像 先构建一个基础镜像,添加repo的环境和编译的环境,而centos镜像就是初始的官方镜像,后面构建php.nginx.mysql都使 ...

  6. CentOS7搭建Zookeeper环境

    Linux下安装JDK 1.检查一下系统中的jdk版本 [root@localhost software]# java -version 显示: openjdk version "1.8.0 ...

  7. ZooKeeper系列(1):安装搭建ZooKeeper环境

    ZooKeeper系列文章:https://www.cnblogs.com/f-ck-need-u/p/7576137.html#zk ZooKeeper有三种安装模式:单机安装(standalone ...

  8. 【Zookeeper系列】构建ZooKeeper应用(转)

    原文地址:https://www.cnblogs.com/sunddenly/p/4064992.html 一.配置服务 配置服务是分布式应用所需要的基本服务之一,它使集群中的机器可以共享配置信息中那 ...

  9. [转]利用Docker构建开发环境

    利用Docker构建开发环境 Posted by  makewonder on 2014 年 4 月 2 日   最近接触PAAS相关的知识,在研发过程中开始使用Docker搭建了自己完整的开发环境, ...

随机推荐

  1. Python爬虫利器:BeautifulSoup库

    Beautiful Soup parses anything you give it, and does the tree traversal stuff for you. BeautifulSoup ...

  2. PAT 甲级 1068 Find More Coins

    https://pintia.cn/problem-sets/994805342720868352/problems/994805402305150976 Eva loves to collect c ...

  3. 在 SQL Server 中从完整路径提取文件名(sql 玩转文件路径)

    四个函数: --1.根据路径获取文件名 -- ============================================= -- Author: Paul Griffin -- Crea ...

  4. Linux命令(二十七) 用户组管理命令

    Linux提供了一系列的命令管理用户组.用户组就是具有相同特征的用户集合.每个用户都有一个用户组,系统能对一个用户组中所有用户进行集中管理,通过把相同属性的用户定义到同一用户组,并赋予该用户自一定的操 ...

  5. [转帖]技术盛宴 | 关于PoE以太网供电技术详解

    技术盛宴 | 关于PoE以太网供电技术详解 https://smb.pconline.com.cn/1208/12085824.html   [PConline 干货铺]随着物联网技术飞速发展,需要提 ...

  6. [转帖]"微信支付"勒索病毒制造者被锁定 传播、危害和疫情终极解密 --- 可以学习下一年火绒团队的分析原理的精神.

    "微信支付"勒索病毒制造者被锁定 传播.危害和疫情终极解密 https://www.cnbeta.com/articles/tech/794851.htm 12月1日,首个要求&q ...

  7. Linux学习之CentOS(二)----远程登录管理工具SecureCRT的使用

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/3 ...

  8. Day24-Ajax操作、图片验证码、KindEditor使用-转

    参考源:http://blog.csdn.net/fgf00/article/details/54917439 三.Ajax操作 ajax操作基于浏览器的xmlHttpRequest对象,IE低版本是 ...

  9. Fib的奇怪定理 : gcd(F[n],F[m])=F[gcd(n,m)]

    引理1:gcd(F[n],f[n-1])=1 因为 F[n]=f[n-1]+F[n-2] 所以 gcd(F[n],f[n-1]) = gcd(F[n-1]+F[n-2],F[n-1]) gcd的更损相 ...

  10. 解题:HNOI 2014 世界树

    题面 首先建虚树 DFS求虚树上每个点所属的点和到它所属点的距离,然后在=考虑虚树所有的边(对应原树一条链).如果两个端点所属节点不同就倍增出分界点统计答案,否则不用管(之后会统计到的):注意根节点特 ...