docker 常用软件 run 命令
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker 常用软件 run 命令相关的知识,希望对你有一定的参考价值。
//sonarqube
docker run -d --name sonarqube -p 8998:9001 -p 8999:9092 -e SONARQUBE_JDBC_USERNAME=root -e SONARQUBE_JDBC_PASSWORD=root -e SONARQUBE_JDBC_URL=jdbc:mysql://192.168.1.120:3306/sonar?useUnicode=true/&characterEncoding=utf8 sonarqube:latest
//tomcat
docker run -dt --name tomcat-cas -p 8888:8080 -v /opt/tomcat/tomcat-cas:/usr/local/tomcat/webapps tomcat:latest
docker run -dt --name tomcat-orgmanager -p 8889:8080 -v /opt/tomcat/orgmanager:/usr/local/tomcat/webapps tomcat:latest
docker run -dt --name tomcat-SmartAdmin -p 8890:8080 -v /opt/tomcat/SmartAdmin:/usr/local/tomcat/webapps tomcat:latest
docker run -dt --name tomcat-orgclient1 -p 8890:8080 -v /opt/tomcat/orgclient1:/usr/local/tomcat/webapps tomcat:latest
docker run -dt --name tomcat-orgclient2 -p 8891:8080 -v /opt/tomcat/orgclient2:/usr/local/tomcat/webapps tomcat:latest
//mysql
docker run --name some-mysql -v /opt/mysql/db:/var/lib/mysql -v /opt/mysql/confd:/etc/mysql/conf.d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
//nginx
docker run --name nginx -v /opt/nginx/conf:/etc/nginx -v /opt/nginx/html:/usr/share/nginx/html -p 80:80 -d nginx
//etcd
docker run --name etcd -d -p 4001:4001 -v /etcd/data:/data elcolio/etcd -name etcd -listen-client-urls=http://192.168.1.112:4001 -advertise-client-urls http://192.168.1.112:4001 -initial-advertise-peer-urls http://192.168.1.112:7001
export HostIP="192.168.12.50"
docker run -d -v /opt/etcd/ssl/certs:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
--name etcd elcolio/etcd \
-name etcd0 \
-advertise-client-urls http://192.168.1.121:2379,http://192.168.1.121:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://192.168.1.121:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://192.168.1.121:2380 \
-initial-cluster-state new
docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \ --name etcd quay.io/coreos/etcd:v2.0.8 \ -name etcd0 \ -advertise-client-urls http://${HostIP}:2379,http://${HostIP}:4001 \ -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ -initial-advertise-peer-urls http://${HostIP}:2380 \ -listen-peer-urls http://0.0.0.0:2380 \ -initial-cluster-token etcd-cluster-1 \ -initial-cluster etcd0=http://${HostIP}:2380 \ -initial-cluster-state new
以上是关于docker 常用软件 run 命令的主要内容,如果未能解决你的问题,请参考以下文章
Dockerfile文件常用命令,docker容器的隔离机制授权,及docker run命令运行与调试