Docker Compose image container

Asked

Viewed 183 times

5

How to connect 3 images in Docker-Compose ? i would like Elasticsearch, Kibana and panthomJS to be inserted in only 1 container, but I only got Elasticsearch with Kibana.

How can I do that? Any information about it with any version I can turn around after.

2 answers

2

I have a Docker-Compose with the settings of Elastic and of Kibana, just you enter the other service you want, if you copy this code from here care with identation.

To climb the services is enough docker-compose up -d

Notice I left one XXXX add the user and password settings you want. Remember that they will not run in the same container, but in a container network.

version: "2"
    services:
      elasticsearch:
        image: "docker.elastic.co/elasticsearch/elasticsearch:7.3.1"
        container_name: elasticsearch
        environment:
            - "discovery.type=single-node"
            - ELASTIC_PASSWORD=XXXX
            - xpack.security.enabled=true
        volumes:
          - esdata01:/usr/share/elasticsearch/data
        ports:
            - 9200:9200

      kibana:
          image: "docker.elastic.co/kibana/kibana:7.3.1"
          container_name: kibana
          environment:
            - ELASTICSEARCH_URL="elasticsearch:9200"
            - ELASTICSEARCH_USERNAME=XXXX
            - ELASTICSEARCH_PASSWORD=XXXX
            - xpack.security.enabled=true
          links:
           - elasticsearch
          ports: 
            - 5601:5601
          depends_on: 
            - elasticsearch  

1

  • the link is broken, is giving 404

  • Resolvido @Caioaugustopapai origado!

  • A link-only response would be more appropriate as a comment.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.