Skip to content

Commit

Permalink
镜像名称调整优化,提交进行自动构建,docker search 可用
Browse files Browse the repository at this point in the history
  • Loading branch information
supermy committed Jun 30, 2015
1 parent 70efdcd commit e942695
Show file tree
Hide file tree
Showing 83 changed files with 1,095 additions and 161 deletions.
19 changes: 1 addition & 18 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/sqldialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.log
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ docker run -i -t myjava7/debian:latest
todo
规则殷勤:drools 平台使用
工作流:activiti
2015-06-16
设置默认时区为上海,debian 镜像包,重新构建其他镜像包。


20150408
增加dns-docker镜像,方便通过dns配置域名
Expand Down
30 changes: 16 additions & 14 deletions common/build.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
docker build -t jamesmo/debian:7 mydebian
docker build -t jamesmo/jre:7 myjre7
docker build -t jamesmo/jdk:7 myjava7
docker build -t jamesmo/solr:4.10.2 mysolr
#!/usr/bin/env bash
docker build -t supermy/docker-docker-debian:7 mydebian
docker build -t supermy/docker-docker-jre:7 myjre7
docker build -t supermy/docker-jdk:7 myjava7
docker build -t supermy/docker-solr:4.10.2 mysolr

docker build -t jamesmo/kafka:0.8 mykafka
docker build -t supermy/docker-kafka:0.8 mykafka

docker build -t jamesmo/rabbitmq_base:3.5 myrabbitmq
docker build -t jamesmo/rabbitmq:3.5 myrabbitmq/rabbitmq
docker build -t supermy/docker-rabbitmq_base:3.5 myrabbitmq
docker build -t supermy/docker-rabbitmq:3.5 myrabbitmq/rabbitmq

docker build -t jamesmo/myflume:latest myflume
docker build -t supermy/docker-myflume:latest myflume

docker build -t jamesmo/myredis:3.5 myredis
docker build -t jamesmo/mysql:latest mysql
docker build -t supermy/docker-mytwemproxy:0.3 mytwemproxy
docker build -t supermy/docker-myredis:3.5 myredis
docker build -t supermy/docker-mysql:latest mysql

docker build -t jamesmo/storm_base:0.9.3 mystorm/storm
docker build -t jamesmo/storm-nimbus:0.9.3 mystorm/storm-nimbus
docker build -t jamesmo/storm-supervisor:0.9.3 mystorm/storm-supervisor
docker build -t jamesmo/storm-ui:0.9.3 mystorm/storm-ui
docker build -t supermy/docker-storm_base:0.9.3 mystorm/storm
docker build -t supermy/docker-storm-nimbus:0.9.3 mystorm/storm-nimbus
docker build -t supermy/docker-storm-supervisor:0.9.3 mystorm/storm-supervisor
docker build -t supermy/docker-storm-ui:0.9.3 mystorm/storm-ui
16 changes: 8 additions & 8 deletions common/mycloud/fig.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#hbase集群
#hadoop集群
nn:
image: jamesmo/snappy-spark-nn:cdh5
image: supermy/docker-snappy-spark-nn:cdh5
environment:
HOSTNAME_NN: mynn
ports:
Expand All @@ -13,7 +13,7 @@ nn:


yarn:
image: jamesmo/snappy-spark-yarn:cdh5
image: supermy/docker-snappy-spark-yarn:cdh5
links:
- nn:mynn
environment:
Expand All @@ -25,7 +25,7 @@ yarn:
hostname: yarn

dn1:
image: jamesmo/snappy-spark-dn:cdh5
image: supermy/docker-snappy-spark-dn:cdh5
links:
- nn:mynn
- yarn
Expand All @@ -38,7 +38,7 @@ dn1:


dn2:
image: jamesmo/snappy-spark-dn:cdh5
image: supermy/docker-snappy-spark-dn:cdh5
links:
- nn:mynn
- yarn
Expand All @@ -58,7 +58,7 @@ zk:
- "3888:3888"

hb:
image: jamesmo/snappy-spark-hb:cdh5
image: supermy/docker-snappy-spark-hb:cdh5
links:
- nn:mynn
- dn1:mydn1
Expand All @@ -76,7 +76,7 @@ hb:
hostname: hbasemasteripc

rs:
image: jamesmo/snappy-spark-rs:cdh5
image: supermy/docker-snappy-spark-rs:cdh5
links:
- nn:mynn
- dn1:mydn1
Expand All @@ -98,7 +98,7 @@ rs:


initdb:
image: jamesmo/snappy-spark-initdb:cdh5
image: supermy/docker-snappy-spark-initdb:cdh5
links:
- nn:mynn
- dn1:mydn1
Expand All @@ -116,7 +116,7 @@ initdb:
hostname: hregionserver1

flume1:
image: jamesmo/myflume:latest
image: supermy/docker-myflume:latest
environment:
FLUME_AGENT_NAME: a1
FLUME_CONF_DIR: /opt/flume/conf
Expand Down
24 changes: 22 additions & 2 deletions common/mydebian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:latest

#2015-01-24修订,中文语言
MAINTAINER JamesMo <[email protected]>
MAINTAINER supermy <[email protected]>

#RUN sed -i '1,3d' /etc/apt/sources.list

Expand Down Expand Up @@ -38,6 +38,24 @@ RUN apt-get -y install locales && \
export LANG=zh_CN.UTF-8 && \
locale

RUN sed -i '$a \
* soft nproc 65536 \
* hard nproc 65536 \
* soft nofile 65536 \
* hard nofile 65536 \
' \
/etc/security/limits.conf


#RUN sed -i '$a \
# fs.file-max = 767246 \
# fs.aio-max-nr = 1048576 \
# ' /etc/sysctl.conf

RUN sed -i '$a \
ulimit -s 4096 \
ulimit -m 15728640 \
' /etc/profile


RUN apt-get -y update && apt-get install -qq -y unzip
Expand All @@ -55,9 +73,11 @@ RUN chmod +x /usr/local/bin/pipework
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN echo "Asia/Shanghai" > /etc/timezone
RUN dpkg-reconfigure -f noninteractive tzdata

ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN:zh

#userage
#docker build -t jamesmo/debian:7 mydebian
#docker build -t supermy/docker-debian:7 mydebian
2 changes: 1 addition & 1 deletion common/mydebian/fig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#源和中文环境配置
base:
image: jamesmo/debian:7
image: supermy/docker-debian:7
# ports:
# - "22"
# volumes_from:
Expand Down
2 changes: 1 addition & 1 deletion common/myflume/fig.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
base:
image: jamesmo/myflume:latest
image: supermy/docker-myflume:latest
environment:
FLUME_AGENT_NAME: a1
FLUME_CONF_DIR: /opt/flume/conf
Expand Down
2 changes: 1 addition & 1 deletion common/myjava7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jamesmo/debian:7
FROM supermy/docker-debian:7

## Install Oracle JDK
RUN wget --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" \
Expand Down
2 changes: 1 addition & 1 deletion common/myjava7/fig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#源和中文环境配置
base:
image: jamesmo/jdk:7
image: supermy/docker-jdk:7
ports:
- "22"
volumes_from:
Expand Down
2 changes: 1 addition & 1 deletion common/myjre7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jamesmo/debian:7
FROM supermy/docker-debian:7

RUN wget --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/7u76-b13/server-jre-7u76-linux-x64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion common/myjre7/fig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#源和中文环境配置
base:
build: jamesmo/jre:7
build: supermy/docker-jre:7
ports:
- "22"
volumes_from:
Expand Down
4 changes: 2 additions & 2 deletions common/mykafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM jamesmo/jre:7
FROM supermy/docker-jre:7

MAINTAINER jamesmo
MAINTAINER supermy

RUN apt-get update && apt-get install -y unzip

Expand Down
8 changes: 4 additions & 4 deletions common/mykafka/fig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ zookeeper:

##消息队列,配置ip and port
kafka1:
image: jamesmo/kafka:0.8
image: supermy/docker-kafka:0.8
ports:
- "9092:9092"
links:
Expand All @@ -24,7 +24,7 @@ kafka1:

##消息队列,配置ip and port
kafka2:
image: jamesmo/kafka:0.8
image: supermy/docker-kafka:0.8
ports:
- "9093:9092"
links:
Expand All @@ -38,7 +38,7 @@ kafka2:

##消息队列,配置ip and port
kafka3:
image: jamesmo/kafka:0.8
image: supermy/docker-kafka:0.8
ports:
- "9094:9092"
links:
Expand All @@ -62,7 +62,7 @@ kafka3:

#采集数据,传输给kafka
flume1:
image: jamesmo/myflume:latest
image: supermy/docker-myflume:latest
environment:
FLUME_AGENT_NAME: producer
FLUME_CONF_DIR: /opt/flume/conf
Expand Down
80 changes: 80 additions & 0 deletions common/mymonitor/cacti/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
FROM supermy/docker-debian:7

MAINTAINER supermy"[email protected]"


RUN sed -i '1,3d' /etc/apt/sources.list
RUN echo '#hello'>> /etc/apt/sources.list

RUN sed -i '1a \
deb http://mirrors.163.com/debian/ wheezy main non-free contrib \n \
deb http://mirrors.163.com/debian/ wheezy-proposed-updates main contrib non-free \n \
deb http://mirrors.163.com/debian-security/ wheezy/updates main contrib non-free \n \
deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib \n \
deb-src http://mirrors.163.com/debian/ wheezy-proposed-updates main contrib non-free \n \
deb-src http://mirrors.163.com/debian-security/ wheezy/updates main contrib non-free \n \
' /etc/apt/sources.list


#安装cacti环境,会自动安装mysql
#snmp抓到数据不是存储在mysql中,而是存在rrdtool生成的rrd文件中
#rrdtool的作用只是存储数据和画图
RUN apt-get update
RUN apt-get install snmpd apache2 -qqy
RUN apt-get install cacti cacti-spine -qqy

##startup scripts
#Pre-config scrip that maybe need to be run one time only when the container run the first time .. using a flag to don't
#run it again ... use for conf for service ... when run the first time ...
RUN mkdir -p /etc/my_init.d
COPY startup.sh /etc/my_init.d/startup.sh
RUN chmod +x /etc/my_init.d/startup.sh


##Adding Deamons to containers

RUN mkdir /etc/service/apache2
COPY apache2.sh /etc/service/apache2/run
RUN chmod +x /etc/service/apache2/run

RUN mkdir /etc/service/mysqld
COPY mysqld.sh /etc/service/mysqld/run
RUN chmod +x /etc/service/mysqld/run

# snmpd 进行数据采集
RUN mkdir /etc/service/snmpd
COPY snmpd.sh /etc/service/snmpd/run
RUN chmod +x /etc/service/snmpd/run

#建立数据库和用户,外置处理。
#pre-config scritp for different service that need to be run when container image is create
#maybe include additional software that need to be installed ... with some service running ... like example mysqld
COPY pre-conf.sh /sbin/pre-conf
RUN chmod +x /sbin/pre-conf \
&& /bin/bash -c /sbin/pre-conf \
&& rm /sbin/pre-conf

##scritp that can be running from the outside using docker-bash tool ...
## for example to create backup for database with convitation of VOLUME dockers-bash container_ID backup_mysql
COPY backup.sh /sbin/backup
RUN chmod +x /sbin/backup
VOLUME /var/backups


#add files and script that need to be use for this container
#include conf file relate to service/daemon
#additionsl tools to be use internally
COPY snmpd.conf /etc/snmp/snmpd.conf
COPY cacti.conf /etc/dbconfig-common/cacti.conf
COPY debian.conf /etc/cacti/debian.php
COPY spine.conf /etc/cacti/spine.conf

# to allow access from outside of the container to the container service
# at that ports need to allow access from firewall if need to access it outside of the server.
EXPOSE 161

#creatian of volume
#VOLUME

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
Loading

0 comments on commit e942695

Please sign in to comment.