docker 常用服务启动

创建网络:

docker network create --driver=bridge --subnet=172.18.0.0/16 --gateway 172.18.0.1 mynet

启动PHP-NGINX:

docker run -d -p 2345:2345 -p80:80 -v e:/web:/app --net mynet --name php-nginx houlijiang/php-nginx php /web/mwj/es/start.php start

启动ES:

docker run -d --name es.server -p 9200:9200 -p 9300:9300 --ip 172.18.0.2 --net mynet -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -v /etc/elasticsearch/config/es:/usr/share/elasticsearch/config -v /etc/elasticsearch/config/ik:/usr/share/elasticsearch/plugins/ik/config -v /data/elasticsearch/data/nodes:/usr/share/elasticsearch/data/nodes registry.cn-beijing.aliyuncs.com/houlijiang/es-ik:6.8.14

启动mysql:

docker run -v /data/mysql-master/conf.d:/etc/mysql/conf.d -v /data/mysql-master/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d -p 33060:3306 --net mynet --ip 172.18.0.3 --name mysql.master mysql:5.7

启动rabbitmq:

here is a second set of tags provided with the management plugin installed and enabled by default, which is available on the standard management port of 15672, with the default username and password of guest / guest:
docker run -d --hostname my-rabbit --net mynet --name mq.server -p 15672:15672 -p 5672:5672 rabbitmq:3-management

启动ftp:

docker run -d -v /wwwroot/wordpress/:/home/vsftpd/user01 \
-p 20:20 \
-p 21:21 \
-p 21100-21110:21100-21110 \
-e FTP_USER=user01 \
-e FTP_PASS=123456 \
-e PASV_ADDRESS=0.0.0.0 \
-e PASV_MIN_PORT=21100 \
-e PASV_MAX_PORT=21110 \
-e pasv_promiscuous=YES \
--name vsftpd \
--restart=always \
fauria/vsftpd

留下评论