Docker

Docker

docker下安装elastsicsearch搜索引擎

安装esdockerpullelasticsearch:7.14.0dockerrun--namees-p9200:9200-p9300:9300-e"discovery.type=single-node"-eES_JAVA_OPTS="-Xms256m-Xmx256m"--networkmynetwork--ip172.18.0.7-v/d/docker/docker-php/elasticsearch/data:/usr/share/elasticsearch/
Docker

docker基于network安装php环境

docker创建自定义网络代替--link 让容器互通 创建网络#--privileged=true--restart=alwaysdockernetworkcreate--subnet=172.18.0.0/16mynetworkdockernetworkls#dockernetworkrmmynetwork安装php、nginxdockerrun--namephp7.4.22-fpm-v/d/docker/docker-php/nginx/www:/www--netw...
Docker

Docker常用命令

#载入镜像dockerpullubuntu#用某个镜像启动一个容器,并以命令行进入容器dockerrun-itubuntu/bin/bash#后台运行容器dockerrun-itd--nameubuntu-testubuntu/bin/bash#查看所有容器dockerps-a#启动一个已经停止的容器dockerstart{CONTAINERID}#停止容器dockerstop{CONTAINERID}#进入容器...