CentOS kafka dockerfile
DockerFile:
FROM centos:7
ENV KAFKA_VERSION "0.8.2.2"
RUN yum -y install vim lsof wget tar bzip2 unzip vim-enhanced passwd sudo yum-utils hostname net-tools rsync man git make automake cmake patch logrotate python-devel libpng-devel libjpeg-devel pwgen python-pip
RUN mkdir /opt/java &&\
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-linux-x64.tar.gz -P /opt/java
RUN mkdir /opt/kafka &&\
wget http://apache.fayea.com/kafka/$KAFKA_VERSION/kafka_2.11-$KAFKA_VERSION.tgz -P /opt/kafka
RUN tar zxvf /opt/java/jdk-8u102-linux-x64.tar.gz -C /opt/java &&\
JAVA_HOME=/opt/java/jdk1.8.0_102 &&\
sed -i "/^PATH/i export JAVA_HOME=$JAVA_HOME" /root/.bash_profile &&\
sed -i "s%^PATH.*$%&:$JAVA_HOME/bin%g" /root/.bash_profile &&\
source /root/.bash_profile
RUN tar zxvf /opt/kafka/kafka*.tgz -C /opt/kafka &&\
sed -i 's/num.partitions.*$/num.partitions=3/g' /opt/kafka/kafka_2.11-$KAFKA_VERSION/config/server.properties
RUN echo "source /root/.bash_profile" > /opt/kafka/start.sh &&\
echo "cd /opt/kafka/kafka_2.11-"$KAFKA_VERSION >> /opt/kafka/start.sh &&\
echo "sed -i 's%zookeeper.connect=.*$%zookeeper.connect=zookeeper:2181%g' /opt/kafka/kafka_2.11-"$KAFKA_VERSION"/config/server.properties" >> /opt/kafka/start.sh &&\
echo "bin/kafka-server-start.sh config/server.properties" >> /opt/kafka/start.sh &&\
chmod a+x /opt/kafka/start.sh
EXPOSE 9092
ENTRYPOINT ["sh", "/opt/kafka/start.sh"]
build:
docker build -t jiankunking/kafka:0.8.2.2 -f kafka.Dockerfile .
作者:jiankunking 出處:http://blog.csdn.net/jiankunking
相關文章
- CentOS zookeeper dockerfileCentOSDocker
- fs.1.10 ON CENTOS7 dockerfile模式CentOSDocker模式
- Kafka學習之(二)Centos下安裝KafkaKafkaCentOS
- centos7 vim 編輯Dockerfile顯示高亮CentOSDocker
- 使用Dockerfile建立帶Apache服務的Centos Docker映象DockerApacheCentOS
- CentOS6.5 安裝Kafka叢集CentOSKafka
- centos7安裝單機kafkaCentOSKafka
- Docker 入門系列四:Dockerfile-自定義 CentOS7 映象DockerCentOS
- Kafka學習之(三)Centos下給PHP開啟Kafka擴充套件(rdkafka)KafkaCentOSPHP套件
- CentOS 7.0 安裝配置 kafka 訊息佇列CentOSKafka佇列
- DockerfileDocker
- Centos7編譯安裝kafka-manager教程CentOS編譯Kafka
- Dockerfile技巧Docker
- Docker DockerfileDocker
- CentOS6.5安裝kafka-2.10-0.8.2(單機)CentOSKafka
- 一個dockerfile例子(參考著寫dockerfile)Docker
- Dockerfile入門(使用Dockerfile生成jdk1.8映象)DockerJDK
- dockerfile 語法Docker
- Dockerfile編寫Docker
- Dockerfile常用指令Docker
- 編寫DockerFileDocker
- Dockerfile入門Docker
- Dockerfile詳解Docker
- Dockerfile建立映象Docker
- Dockerfile筆記Docker筆記
- Dockerfile學習Docker
- Docker 入門:DockerfileDocker
- Docker_07 DockerfileDocker
- [Dockerfile構建映象]Docker
- DockerFile構建映象Docker
- Dockerfile 命令詳解Docker
- Docker的Dockerfile指令Docker
- Docker學習—DockerFileDocker
- 倉庫管理、dockerfileDocker
- Dockerfile定製映象Docker
- Docker 基礎 : DockerfileDocker
- Dockerfile構建MySQLDockerMySql
- dockerfile測試例子Docker