我想安装一个包含以下内容的环境: nginx的 PHP7 ElasticSearch MariaDB的
我已经做过拉&跑 输入命令后: Docker exec -i -t dockernginxmariadbzodio_nginx_1 / bin / bash 我有以下错误:
**Error response from daemon: / 33c92767302f_dockernginxmariadbzodio_elasticsearch_1 AS / dockernginxmariadbzodio_
nginx_1 / dockernginxmariadbzodio_elasticsearch_1**
在论坛上通过后,我测试了命令: Docker-composer up elasticsearch enter image description here
搬运工-compose.yml
elasticsearch:
image: elasticsearch:latest
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
- xpack.security.enabled=false
- ES_JAVA_OPTS="-Xms512m -Xmx512m"
volumes:
- C:/dockerProximis/docker_proximis_zodio/zodio/elasticsearch/data:/usr/share/elasticsearch/data:rw
答案 0 :(得分:0)
我认为你在这里混合了两件事:
image
定义指向Docker Hub图像https://hub.docker.com/_/elasticsearch/ xpack.security.enabled=false
,尤其是ES_JAVA_OPTS="-Xms512m -Xmx512m"
使用的是Elastic的图片https://github.com/elastic/elasticsearch-docker 尝试:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
- xpack.security.enabled=false
- ES_JAVA_OPTS="-Xms512m -Xmx512m"
volumes:
- C:/dockerProximis/docker_proximis_zodio/zodio/elasticsearch/data:/usr/share/elasticsearch/data:rw
答案 1 :(得分:0)
我找到了解决方案 实际上问题是记忆
溶液 1 - 更改默认vm设置: 删除默认的vm
docker-machine rm default
docker-machine create -d virtualbox --virtualbox-cpu-count=2 --virtualbox-memory=2048 --virtualbox-disk-size=50000 default
docker-machine stop
exit
然后开始打开一个新的Docker Quickstart终端。
2 - 修改map_count的内存
docker-machine ssh
sudo sysctl -w vm.max_map_count=262144
exit
停止并取出容器后:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker-compose up –d
没关系。 :)