docker-compose安装elasticsearch和activemq 发表于 2019-04-12 | 分类于 Docker , Docker-compose | | 字数统计: 166 字 | 阅读时长≈ 1 分钟 docker-compose.yml123456789101112131415161718192021222324252627282930313233343536373839404142434445version: '3'services: es: hostname: elasticsearch image: elasticsearch:6.6.1 volumes: - /home/Docker/es/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml # - /home/Docker/jvm.options:/usr/share/elasticsearch/config/jvm.options environment: # - bootstrap.memory_lock=true - node.name=node-1 - cluster.name=jw-test - "ES_JAVA_OPTS=-Xms2g -Xmx2g" # - discovery.type=single-node - TAKE_FILE_OWNERSHIP=true command: elasticsearch ports: - "9200:9200" - "9300:9300" activemq: #定义主机名 hostname: activemq #使用的镜像 image: docker.io/webcenter/activemq #容器的映射端口 ports: - 8161:8161 #定义IP网络 # networks: # staticneta: # ipv4_address: 172.20.1.4 #定义挂载点 volumes: - /home/Docker/acmq/data/activemq:/data/activemq - /home/Docker/acmq/var/log/activemq:/var/log/activemq #环境变量 environment: ACTIVEMQ_ADMIN_LOGIN: admin ACTIVEMQ_ADMIN_PASSWORD: admin ACTIVEMQ_CONFIG_MINMEMORY: 512 ACTIVEMQ_CONFIG_MAXMEMORY: 2048 TZ: Asia/Shanghai LANG: en_US.UTF-8 开启服务12345678$ docker-compose up# 后台启动$ docker-compose up -d# 停止$ docker-compose down