容器运行命令

docker运行各种容器命令和挂在目录(后续再补充)

ES:docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms64m -Xmx128m" -v /usr/share/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /usr/share/elasticsearch/data:/usr/share/elasticsearch/data -v /usr/share/elasticsearch/plugins:/usr/share/elasticsearch/plugins --network es-net --privileged -d elasticsearch:7.6.2


NGINX:docker run -p 80:80 -p 443:443  --name nginx -v /usr/local/nudt-portal-frond/nginx/nginx.conf:/etc/nginx/nginx.conf -v/usr/share/nudt-portal-frond/nginx/conf.d:/etc/nginx/conf.d -v /usr/share/nudt-portal-frond/nginx/log:/var/log/nginx -v /usr/share/nudt-portal-frond:/usr/share/nginx/html -d -v /usr/share/nudt-portal-frond/nginx:/usr/local/nudt-portal-frond/nginx -v /usr/local/work:/usr/local/work -v /usr/share/work/file:/usr/local/work/file --restart=always nginx:latest


mysql:docker run -d -p 3306:3306 --privileged=true -v /usr/share/mysql/log:/var/log/mysql -v /usr/share/mysql/data:/var/lib/mysql -v /usr/share/mysql/conf:/etc/mysql/conf.d -v /usr/share/mysql/conf/my.cnf:/etc/mysql/my.cnd -e MYSQL_ROOT_PASSWORD=root --name mysql mariadb:10.0.25 --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci

你可能感兴趣的:(docker)