您的位置 首页 docker

docker制作zookeeper镜像

制作zookeeper镜像

这个镜像依赖 : docker 创建基于 centos7的 jdk8的镜像 

方法就是,一边运行镜像,手动搭建, 一边写dockerfile

 

Dockerfile 内容

 

FROM harbor.baimei.com/huaxiang/jdk:1.8u291

LABEL school=baimei \
      class=linux86

RUN yum -y install net-tools && rm -rf /var/cache/yum

ENV JAVA_HOME=/baimei/softwares/jdk1.8.0_291/

ADD softwares/apache-zookeeper-3.8.1-bin.tar.gz /baimei/softwares/

RUN cp /baimei/softwares/apache-zookeeper-3.8.1-bin/conf/{zoo_sample.cfg,zoo.cfg}

COPY /scripts/start.sh /

CMD ["bash","-x","/start.sh"]

 

build.sh

#!/bin/bash

docker build -t harbor.baimei.com/huaxiang/zookeeper:3.8.1 .
docker push harbor.baimei.com/huaxiang/zookeeper:3.8.1

 

cat scripts/start.sh

#!/bin/bash


/baimei/softwares/apache-zookeeper-3.8.1-bin/bin/zkServer.sh start


tail -f /etc/hosts

config 内容是空

 

运行:

sh build.sh

 

用户画像相关: https://url69.ctfile.com/d/253469-56597570-82009a?p=2206 (访问密码: 2206)

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章