002_docker构建zookeeper环境
最近因为要维护公司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环境的更多相关文章
- hadoop2.6.2+hbase+zookeeper环境搭建
1.hadoop环境搭建,版本:2.6.2,参考:http://www.cnblogs.com/bookwed/p/5251393.html 启动服务:在master机器上,进入hadoop安装目录, ...
- ZooKeeper学习第四期---构建ZooKeeper应用
一.配置服务 配置服务是分布式应用所需要的基本服务之一,它使集群中的机器可以共享配置信息中那些公共的部分.简单地说,ZooKeeper可以作为一个具有高可用性的配置存储器,允许分布式应用的参与者检索和 ...
- [转]云计算之hadoop、hive、hue、oozie、sqoop、hbase、zookeeper环境搭建及配置文件
云计算之hadoop.hive.hue.oozie.sqoop.hbase.zookeeper环境搭建及配置文件已经托管到githubhttps://github.com/sxyx2008/clou ...
- zookeeper 环境搭建
1.准备三台服务器 ip分别为:192.168.100.128.192.168.100.129.192.168.100.133 a.修改主机名称 vi /etc/sysconfig/network 修 ...
- Docke--Dockerfile 构建LNMP环境
Dockerfile 构建nginx并结合php 1.构建基础镜像 先构建一个基础镜像,添加repo的环境和编译的环境,而centos镜像就是初始的官方镜像,后面构建php.nginx.mysql都使 ...
- CentOS7搭建Zookeeper环境
Linux下安装JDK 1.检查一下系统中的jdk版本 [root@localhost software]# java -version 显示: openjdk version "1.8.0 ...
- ZooKeeper系列(1):安装搭建ZooKeeper环境
ZooKeeper系列文章:https://www.cnblogs.com/f-ck-need-u/p/7576137.html#zk ZooKeeper有三种安装模式:单机安装(standalone ...
- 【Zookeeper系列】构建ZooKeeper应用(转)
原文地址:https://www.cnblogs.com/sunddenly/p/4064992.html 一.配置服务 配置服务是分布式应用所需要的基本服务之一,它使集群中的机器可以共享配置信息中那 ...
- [转]利用Docker构建开发环境
利用Docker构建开发环境 Posted by makewonder on 2014 年 4 月 2 日 最近接触PAAS相关的知识,在研发过程中开始使用Docker搭建了自己完整的开发环境, ...
随机推荐
- sql两个日期之间的查询统计
sql查询统计 sql语句: select count(code) as '统计',create_time as '订单时间' from sp_orders where datediff(create ...
- MySQL查询where条件的顺序对查询效率的影响
看到有资料说,where条件的顺序会影响查询的效率,根据的逻辑是: where条件的运行是从右到左的,将选择性强的条件放到最右边,可以先过滤掉大部分的数据(而选择性不强的条件过滤后的结果集仍然很大), ...
- 阿里云ECS提示RHSA-2017:3263: curl security update
服务器配置: 原因阿里云安装的CentOS 7.3的curl和libcurl的源不是最新的,会导致安全漏洞出现 方法首先还是要在实例列表远程连接打开终端. 1.更新ca-bundle1.备份: cp ...
- 【模板】Kruskal
int n, m; struct Edge { int u, v, w; }a[MAX_M]; // 令a关于w升序排列 int r[MAX_N]; // 并查集 int Find(int x) { ...
- pgm6
有个比较有意思的想法是编码理论的反问题是 machine learning,这也是这部分学习的一个收获.这个其实很奇怪,编码理论其实是有 ground truth 的,然后通过编码产生“冗余”,这样才 ...
- 【题解】 P1879 玉米田Corn Fields (动态规划,状态压缩)
题目描述 Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ...
- 【转】Git 安装和使用教程
git 提交 全部文件 git add . git add xx命令可以将xx文件添加到暂存区,如果有很多改动可以通过 git add -A .来一次添加所有改变的文件.注意 -A 选项后面还有一个 ...
- acm 比赛模板
C++模板 A-M https://pan.baidu.com/s/1lqR1s5RcAR52UJLYNfmRTQ C++模板 1-13 https://pan.baidu.com/s/1361ShU ...
- [USACO18OPEN]Out of Sorts G 冒泡排序理解之一
题目描述 给一个双向冒泡排序的程序: moo表示输出moo sorted = false while (not sorted): sorted = true moo to N-: ] < A[i ...
- 【转】如何学习android开发
1.Java基础 很多朋友一上手就开始学习Android,似乎太着急了一些.Android应用程序开发是以Java语言为基础的,所以没有扎实的Java基础知识,只 是机械的照抄别人的代码,是没有任何意 ...