docker容器中,几种常用镜像的安装与配置

1.mysql

docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=jk@2017 -v /data/docker_volume/mysql/data:/var/lib/mysql -v /data/docker_volume/mysql/conf:/etc/mysql/conf.d -d mysql:5.7


2.rabbitmq

docker run -d --name rabbitmq -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=123456 -p 5672:5672 -p 15672:15672 rabbitmq:3.6.11-management


3.portainer

docker run -d --name pt -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer


4.ELK

docker run -d -it --name es -p 9200:9200 -p 9300:9300 elasticsearch && \

docker run -d -it --name kibana --link es:elasticsearch -p 5601:5601 kibana && \

docker run -d -it --name logstash -p 5000:5000 logstash -e 'input { tcp { port => 5000 codec => "json" } } output { elasticsearch { hosts => ["192.168.101.228"] index => "sleuth-%{serviceName}"} }'


5.git

yum install -y python-pip

pip install --upgrade pip

pip install docker-compose

wget https://raw.githubusercontent.com/sameersbn/docker-gitlab/master/docker-compose.yml

docker-compose up


暂无评论